- Joined
- Apr 29, 2019
- Messages
- 41
Hi all, I have a trigger that causes leavers to grant shared control of their units, which I assume must be fairly common. My map is only 1 person controlling 1 hero, like DotA.
Trigger: Red Leaver
Event: Player - Player 1 (Red) leaves the game
Actions: Game - Grant shared vision and full shared unit control of Player 1 (Red) units with his/her allies
-
Okay, then I have a trigger which applies when their hero dies, to send them to an arena where they can fight each other while they're bored. This makes other dead people enemies, but not living people.
Trigger: Boromir Dies
Events: Unit - Boromir 0002 <gen> Dies
Actions:
Set Variable Set BoromirDead =1
Wait 10.00 seconds
Camera - Pan camera ... blah blah
Hero - Instantly revive (Dying unit) at ... blah blah
Player Group - Add Player 1(Red) to Villains
Player Group - Remove Player 1 (Red) from Heroes
Player Group - Make Villains treat Player Group - Player 1 (Red) as an Enemy
Player Group - Make Player Group - Player 1 (Red) treat Villains as an Enemy
-
This works perfectly. The players still playing the game do not lose control of the leaver's hero. I guess because they are still in Heroes group, so nothing is being done to their allegiance.
Finally, the trigger that doesn't work. I have events which happen, which resurrects their hero. Since apparently "Make X treat X as an Ally" removes shared unit control, I am looking for the most elegant way to bring the dead unit out of the arena, make them an ally, but if they are a leaver, keep their unit as shared control.
Perhaps this impossible, and I have have to type 50 different triggers out... there are a few different spots you can resurrect, so I would have to repeat this, twice, for every hero, if I was going to make a variable for leaver status and then a conditional trigger whether they left or not... yeah it was less work by far to type this post out.
Anyway, here is the offending trigger. The map in question is the only one in my profile, Balin's Tomb Reforged.
Trigger: Boromir Respawn
Events: Destructible - Hell Cage 0160 <gen> dies
Conditions: BoromirDead Equal to 1
Actions:
Wait 3.00 seconds
Player Grou - Add Player 1 (Red) to Heroes
Player Group - Remove Player 1 (Red) from Villains
Player Group - Make Heroes treat Player Group - Player 1 (Red) as an Ally
Player Group - Make Player Group - Player 1 (Red) treat Heroes as an Ally
Camera - Pan camera ... blah blah
Unit - Move Boromir 002 <gen> instantly to ... blah blah
Hero - Instantly revive Boromir ... blah blah
Unit - Reset ability cooldown for Boromir 0002 <gen>
Unit - Set life of Boromir 0002 <gen> to 100.00%
Unit - Set mana of Boromir 002 <gen> to 100.00%
Trigger: Red Leaver
Event: Player - Player 1 (Red) leaves the game
Actions: Game - Grant shared vision and full shared unit control of Player 1 (Red) units with his/her allies
-
Okay, then I have a trigger which applies when their hero dies, to send them to an arena where they can fight each other while they're bored. This makes other dead people enemies, but not living people.
Trigger: Boromir Dies
Events: Unit - Boromir 0002 <gen> Dies
Actions:
Set Variable Set BoromirDead =1
Wait 10.00 seconds
Camera - Pan camera ... blah blah
Hero - Instantly revive (Dying unit) at ... blah blah
Player Group - Add Player 1(Red) to Villains
Player Group - Remove Player 1 (Red) from Heroes
Player Group - Make Villains treat Player Group - Player 1 (Red) as an Enemy
Player Group - Make Player Group - Player 1 (Red) treat Villains as an Enemy
-
This works perfectly. The players still playing the game do not lose control of the leaver's hero. I guess because they are still in Heroes group, so nothing is being done to their allegiance.
Finally, the trigger that doesn't work. I have events which happen, which resurrects their hero. Since apparently "Make X treat X as an Ally" removes shared unit control, I am looking for the most elegant way to bring the dead unit out of the arena, make them an ally, but if they are a leaver, keep their unit as shared control.
Perhaps this impossible, and I have have to type 50 different triggers out... there are a few different spots you can resurrect, so I would have to repeat this, twice, for every hero, if I was going to make a variable for leaver status and then a conditional trigger whether they left or not... yeah it was less work by far to type this post out.
Anyway, here is the offending trigger. The map in question is the only one in my profile, Balin's Tomb Reforged.
Trigger: Boromir Respawn
Events: Destructible - Hell Cage 0160 <gen> dies
Conditions: BoromirDead Equal to 1
Actions:
Wait 3.00 seconds
Player Grou - Add Player 1 (Red) to Heroes
Player Group - Remove Player 1 (Red) from Villains
Player Group - Make Heroes treat Player Group - Player 1 (Red) as an Ally
Player Group - Make Player Group - Player 1 (Red) treat Heroes as an Ally
Camera - Pan camera ... blah blah
Unit - Move Boromir 002 <gen> instantly to ... blah blah
Hero - Instantly revive Boromir ... blah blah
Unit - Reset ability cooldown for Boromir 0002 <gen>
Unit - Set life of Boromir 0002 <gen> to 100.00%
Unit - Set mana of Boromir 002 <gen> to 100.00%