Dashboard

Deaths on the map example

Record every death with its position and cause, then read hotspots on your map.

Last updated Oct 9, 2026

This example records where players die, why, and which stage they were on. It also logs stage starts and checkpoints, so the Spatial page can show deaths per attempt and where sessions end.

What you will see

  • A marker for every death at its position, grouped into hotspots ranked by count.
  • The cause of a death when you select its marker.
  • Per stage: attempts, deaths, unique players, completion rate and quit after death.

Set up the parts in Studio

Tag parts in View → Tag Editor and add the attributes below.

TagAttributesWhat it does
StageStartStageId (string)The first touch records stage_started and makes that stage the player's default.
CheckpointStageId (string)Records checkpoint_reached once per player.
KillPartCause (string), for example LavaKills the player on touch and remembers why.

No script needed

The module records all of this on its own once the parts are tagged. If you followed the Quick start, press Play, walk onto a StageStart part, touch a KillPart, and the events are sent.

You doThe module records
Tag a part StageStart with StageId 2stage_started on first touch, and stage 2 for that player's later events.
Tag a part Checkpoint with StageId 2checkpoint_reached, once per player.
Tag a part KillPart with Cause LavaThe player dies on touch and player_died is recorded with position, stage and the cause Lava.

Each death is recorded once per life, whether it came from a KillPart, a fall or anything else. Deaths without a KillPart have the cause Unknown.

Read the results

  • Open Spatial and pick a stage. The 3D view shows deaths as markers and clusters them into hotspots.
  • Select a marker to see its cause, stage and device. A red ring marks a death after which the player left the game.
  • Choose Explore these sessions to send the visible sessions to Funnels.
  • To draw your level under the markers, publish a map export for the same buildId. See Spatial analytics.

Notes

  • Why the module records deaths itself. The engine's own death signal has no cause, so the module watches each character and attaches the cause of the KillPart that was touched.
  • One event per life. Died:Once fires a single time for each character.
  • Falling into the void. The position is where the character was when it died, so the height can be very low, but the horizontal position still shows where the fall began.
  • Keep causes short and consistent (for example Lava, not Touched the lava at 4:32) so they are easy to compare.