Hello, I just wanted to get some help on why the respawning in the templates work, and if there is a different way to do them. My main question is why there is an attribute called “Respawn timer.” can anyone tell me what is going on?
When a unit dies, it’ll be destroyed, but
respawntimer is set to the maximal value. The attribute automatically decreases over time, and when it gets 0, it will start a trigger “when player attribute bcomes 0 or less”. It will recreate a unit for the player and that’s how the unit respawns.
yes (simple terms) when a unit dies it starts a timer then when the time reaches 0 the player will respawn.
This respawn system uses a respawn timer that initially starts at its maximum value. When a unit dies, the timer is triggered and begins counting down. As the timer decreases, the unit’s respawn attribute also decreases. Once the respawn attribute reaches 0, a trigger is activated, which recreates the unit for the player, effectively respawning it. This system ensures a delay between a unit’s death and its subsequent respawn, preventing excessive unit generation.