I am making a traditional RPG map with hero,town,monster,quest but I don't know how to make all monsters respawn at their "original position" after they died. Can someone HHHHelp me plz???
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
THX for help. But "Set custom value index 0 of picked unit to the x coordinate of its position. Set custom value index 1 to its y coordinate."
how to do this trigger. i can't find it. and does this means the custom value can represent all my creatures' positions???
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I am making a traditional RPG map with hero,town,monster,quest but I don't know how to make all monsters respawn at their "original position" after they died. Can someone HHHHelp me plz???
@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
@Vexal: Go
THX for help. But "Set custom value index 0 of picked unit to the x coordinate of its position. Set custom value index 1 to its y coordinate." how to do this trigger. i can't find it. and does this means the custom value can represent all my creatures' positions???