trigger_respawn

Modified

12-Jul-2023

This entity, by default, respawns all players when triggered. Alive players will only be relocated to active spawnpoints and have their health restored to their maximum health, unless special flag selected. They keep their equipment. You can also specify that only dead players get respawned by this entity.

Keyvalues


OnDestroy Function ondestroyfn : Name of the function to use from already parsed .as script files when entity is destroyed (killed) in any way. If the function belongs to namespace, you must use prefix with the namespace name (e.g. mynamespace::MyFunction) for the keyvalue.

Name targetname : Set name of trigger_respawn so other entities can trigger it to respawn playr(s). Every trigger use-type works uniformly. Can be kill-targeted.

Target target : Target player to respawn when "Respawn target" is set.

Flags


  • 1 : Respawn Target : If set, trigger_respawn will respawn only the player specified in "Target". If the target is not a player, the spawn-function of that entity will be called. This can sometimes help to process entity-specific keyvalues which are only read when the entity first spawns. However, it might cause unexpected entity behaviour or crashes in the worst case.

  • 2 : Respawn dead players : If set, only players that are dead in a moment of triggering this entity are respawned.

  • 4 : Don't move living players : If set, living players won't be relocated to spawn points.