Do you want the easiest way to implement, and the least amount of work to you? Or do you want the most sensible.
If you'd like the least amount of work:
First, go through and set the death time to -1 for all of the units you'd like to respawn. This will allow you to revive these units indefinitely.
Next, If your units are pre-placed:
At the beginning of the game, at map initialization, run a trigger with these actions:
Pick every unit in map owned by the computer. Set custom value index 0 of picked unit to the x coordinate of its position. Set custom value index 1 to its y coordinate.
For units created later, do the same thing, but upon creation.
Now, for respawning:
Event: Unit dies
have a condition check if it's the computer
Wait ___ seconds (respawn timer)
There is no GUI action for reviving a unit. Use custom script: UnitRevive(EventUnit());
Next action: move unit instantly to point with x-coordinate custom value 0, y-coordinate custom value 1 of triggering unit
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
@wskn99:
Do you want the easiest way to implement, and the least amount of work to you? Or do you want the most sensible.
If you'd like the least amount of work:
First, go through and set the death time to -1 for all of the units you'd like to respawn. This will allow you to revive these units indefinitely.
Next, If your units are pre-placed:
At the beginning of the game, at map initialization, run a trigger with these actions:
Pick every unit in map owned by the computer. Set custom value index 0 of picked unit to the x coordinate of its position. Set custom value index 1 to its y coordinate.
For units created later, do the same thing, but upon creation.
Now, for respawning:
Event: Unit dies
have a condition check if it's the computer
Wait ___ seconds (respawn timer)
There is no GUI action for reviving a unit. Use custom script: UnitRevive(EventUnit());
Next action: move unit instantly to point with x-coordinate custom value 0, y-coordinate custom value 1 of triggering unit