Respawn an actor on death

Problem. You want a defeated actor to come back after a short delay instead of being gone for good.

Pattern. Watch the actor's health resource with a condition, and when it hits zero run an action chain that restores the resource and moves the actor back to a spawn point. A Timer entity introduces the delay before the restore runs.

The building blocks are all data entities:

Action:
  respawnHero:
    do: set_resource_self
    parameters: [respawnResource, respawnValue]
    then: respawnMove
  respawnMove:
    do: set_destination_self
    parameters: [respawnPoint]

Parameter:
  respawnResource: {key: resource, value: health}
  respawnValue: {key: value, value: "100"}
  respawnPoint: {key: destination, value: heroSpawn}

Vector:
  heroSpawn: {x: 240, y: 160}

See the action reference for the exact parameters of set_resource_self and set_destination_self, and the entity reference for Trigger, Timer, and Resource fields.