Skip to content

Lifetime

Destroys its entity after Seconds of game time, optionally fading it out first: bullets, effects, popups.

Each is listed as its key in the scene file and the MCP tools, then its kind of value, its default and what it does.

  • seconds: a number = 2. Seconds until the entity is removed. (Field: a number.)
  • fadeOut: a number = 0. Seconds at the end of its life spent fading out (see FadeTo). 0 just disappears. (Field: a number.)
  • age: a number = 0. Seconds it has been alive: kept with the scene, so a rewind goes on from where it was. (Not sent in a network game: each machine has its own.) (Field: a number.)

Scripts use it as Lifetime: its methods, events and values that aren’t saved with the scene.