Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
Currently creating a two-player co-op RPG map. I want the players to be able to duel eachother. I have figured out how to get the duel started with text and everything but I am having trouble getting the two players back on the same team after the duel.
Is there a event/condition where a "Unit dies in (XXX Region)" ? I could use this so that if a unit dies in the duel region, then it would move the winning player back to town and return both players allied status back to allied instead of Hostile.
Let me know if you know anything I can do to make this happen. Thanks.
Mr Bean was of great help and his idea worked perfectly. I have one other issue I would like to see if I can get help with. I would like text to be displayed to the winner and to the loser, different for each - One text that says "You have won, etc." and another that says "You have lost, etc."
How can I make a trigger where the game knows which players unit died and which one survived? Below are my triggers I currently have for the duel, they work perfectly so far.
Duel
Events
Player - Player 1 (Red) types a chat message containing -duel as An exact match
Player - Player 2 (Blue) types a chat message containing -duel as An exact match
Conditions
Actions
Unit - Move (Random unit from (Units owned by Player 1 (Red) matching (((Matching unit) is A Hero) Equal to True))) instantly to (Center of Duel Player 1 <gen>)
Camera - Pan camera for Player 1 (Red) to (Center of Duel Player 1 <gen>) over 0.00 seconds
Unit - Move (Random unit from (Units owned by Player 2 (Blue) matching (((Matching unit) is A Hero) Equal to True))) instantly to (Center of Duel Player 2 <gen>)
Camera - Pan camera for Player 2 (Blue) to (Center of Duel Player 2 <gen>) over 0.00 seconds
Game - Display to (All players) for 1.00 seconds the text: Duel Begins in
Wait 0.30 seconds
Game - Display to (All players) for 1.00 seconds the text: 3.....
Wait 1.00 seconds
Game - Display to (All players) for 1.00 seconds the text: 2.....
Wait 1.00 seconds
Game - Display to (All players) for 1.00 seconds the text: 1......
Wait 0.30 seconds
Game - Display to (All players) for 1.00 seconds the text: Fight!
Player - Make Player 1 (Red) treat Player 2 (Blue) as an Enemy with shared vision
Player - Make Player 2 (Blue) treat Player 1 (Red) as an Enemy with shared vision
Duel End
Events
Unit - A unit owned by Player 1 (Red) Dies
Unit - A unit owned by Player 2 (Blue) Dies
Conditions
((Duel <gen> contains (Triggering unit)) Equal to True) and (((Triggering unit) is A Hero) Equal to True)
Actions
Wait 2.00 seconds
Unit - Move (Random unit from (Units owned by Player 1 (Red) matching (((Matching unit) is A Hero) Equal to True))) instantly to (Center of Starting Area <gen>)
Unit - Move (Random unit from (Units owned by Player 2 (Blue) matching (((Matching unit) is A Hero) Equal to True))) instantly to (Center of Starting Area <gen>)
Player - Make Player 1 (Red) treat Player 2 (Blue) as an Ally with shared vision
Player - Make Player 2 (Blue) treat Player 1 (Red) as an Ally with shared vision
make a trigger that is unit dies. for condition use a boolean to check if the unit is still in the duel arena if the triggering unit is in the arena then that player lost. the other player is the winner so just check to see if that unit is alive. u also have leaks in ur above triggers. the wait is also a bad idea.
Duel End
Events
Unit - A unit owned by Player 1 (Red) Dies
Unit - A unit owned by Player 2 (Blue) Dies
Conditions
((Duel <gen> contains (Triggering unit)) Equal to True) and (((Triggering unit) is A Hero) Equal to True)
Actions
Wait 2.00 seconds
Unit - Move (Random unit from (Units owned by Player 1 (Red) matching (((Matching unit) is A Hero) Equal to True))) instantly to (Center of Starting Area <gen>)
Unit - Move (Random unit from (Units owned by Player 2 (Blue) matching (((Matching unit) is A Hero) Equal to True))) instantly to (Center of Starting Area <gen>)
Player - Make Player 1 (Red) treat Player 2 (Blue) as an Ally with shared vision
Player - Make Player 2 (Blue) treat Player 1 (Red) as an Ally with shared vision
you should do this instead
Events
Unit - A unit Dies
Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
(Owner of (Triggering unit)) Equal to Player 2 (Blue)
((Duel <gen> contains (Triggering unit)) Equal to True) and (((Triggering unit) is A Hero) Equal to True)
Actions
set Group = (Random 1 units from (Units in (Playable map area) matching (((Owner of (Triggering unit)) Equal to Player 1 (Red)) and (((Triggering unit) is A Hero) Equal to True))))
set Group1 = (Random 1 units from (Units in (Playable map area) matching (((Owner of (Triggering unit)) Equal to Player 2 (Blue)) and (((Triggering unit) is A Hero) Equal to True))))
Wait 2.00 seconds
Unit Group - Pick every unit in Group and do (Unit - Move picked unit instantly to (Center of Starting Area <gen>))
Unit Group - Pick every unit in Group and do (Unit - Move picked unit instantly to (Center of Starting Area <gen>))
Player - Make Player 1 (Red) treat Player 2 (Blue) as an Ally with shared vision
Player - Make Player 2 (Blue) treat Player 1 (Red) as an Ally with shared vision
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.