I have been reading tutorials on how to create a system that revives dead heroes. I have built a trigger for this that is attached below, but I am unsure how to make it work for several players in opposing teams. (Since many heroes can die or be dead simultaneously)
How my mod is intended to work:
Players play in two teams vs each other, with maybe 5-6 players in each team.
Teams start in opposing parts of the map. (All players in Team A starts in the right corner, all players in Team B starts in the left corner, or something like that.)
Each player can select a hero at the start of the game (That is the only unit players control, apart from some minor units that can be summoned temporarily.)
Whenever a hero dies, it is respawned at the starting location 20-30 seconds later.
This is quite standard in Dota-type-of-maps. I do I intend to use this trigger in a mod so it can be played on different maps. Since spawning locations will be different on different maps, the trigger must be able to respawn the heroes at the right location, regardless of what map it is played on.
The trigger I use is attached below, and it is based on the Valerian02a - Hero Death Prevention behavior.
Would anyone here mind helping me by modifying the attached test map?
you issue is you dont know how to regulate where they respawn?
use an if then else:
if: owner of (dying unit) == (players on team 1) [note you may have to use "or" operator]
then: respawn that hero in team one base
else: respawn that hero in team two base
Why use a behavior? Setting the units Death Timer to -1 makes so you can grab them to apply actions to them. -1 makes it so the time it takes for the unit to fully die is infinite then you would just move the unit to a point or region and resurrect it.
Hello,
I have been reading tutorials on how to create a system that revives dead heroes. I have built a trigger for this that is attached below, but I am unsure how to make it work for several players in opposing teams. (Since many heroes can die or be dead simultaneously)
How my mod is intended to work:
Players play in two teams vs each other, with maybe 5-6 players in each team.
Teams start in opposing parts of the map. (All players in Team A starts in the right corner, all players in Team B starts in the left corner, or something like that.)
Each player can select a hero at the start of the game (That is the only unit players control, apart from some minor units that can be summoned temporarily.)
Whenever a hero dies, it is respawned at the starting location 20-30 seconds later.
This is quite standard in Dota-type-of-maps. I do I intend to use this trigger in a mod so it can be played on different maps. Since spawning locations will be different on different maps, the trigger must be able to respawn the heroes at the right location, regardless of what map it is played on.
The trigger I use is attached below, and it is based on the Valerian02a - Hero Death Prevention behavior.
Would anyone here mind helping me by modifying the attached test map?
Add the Valerian02a - Hero Death Prevention, Incapacitated and Incapacitated (Stand Up) behaviors to the relevant units.
Make a trigger that registers for the event "Unit - Any Unit has Valerian02a - Incapacitated change Activate".
Triggering Unit in that trigger is then the hero, and you should just use the "Start Location of Player" function to move it to the correct spot.
you issue is you dont know how to regulate where they respawn?
use an if then else:
if: owner of (dying unit) == (players on team 1) [note you may have to use "or" operator]
then: respawn that hero in team one base
else: respawn that hero in team two base
Unit - Move (Triggering unit) instantly to (Start location of player (Owner of (Triggering unit))) (No Blend)
Why use a behavior? Setting the units Death Timer to -1 makes so you can grab them to apply actions to them. -1 makes it so the time it takes for the unit to fully die is infinite then you would just move the unit to a point or region and resurrect it.