• 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] How do you make units that have won a arena match teleport back to shops?

Status
Not open for further replies.
Level 7
Joined
Sep 7, 2006
Messages
97
Usually i like experiment when i dont know how to do a trigger but this is one i have had some problems with.

I am making a arena map where the units teleport to different arenas,The two forces meet at a arena, the heroes that die are instantly resurrected in their base: Here is the problem. After the battle i want the team that wins remaining heroes to be teleported back to their base. How do i do it?

Thanks in Advanced/Zorga
 
Level 8
Joined
Feb 20, 2007
Messages
338
One team being just one unit or many units?

If just one hero per player then you would need an trigger something like this:

  • Move Units
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Arena 1 <gen> contains (Dying unit)) Equal to True
    • Actions
      • Hero - Instantly revive (Dying unit) at ((Owner of (Dying unit)) start location), Show revival graphics
      • Wait 0.10 seconds
      • Unit Group - Pick every unit in (Units in Arena 1 <gen>) and do (Actions)
        • Loop - Actions
          • Unit - Move (Picked unit) instantly to (Position of Goblin Merchant 0040 <gen>)
This will revive the dying unit - wait a tenth of a second and pick every unit in the arena and move them to the Goblin merchant - since the dead hero has revived he is already out of the region.

If you have many units per team, then you will need to do it slightly differently:

  • Move Units
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Arena 1 <gen> contains (Dying unit)) Equal to True
    • Actions
      • Hero - Instantly revive (Dying unit) at ((Owner of (Dying unit)) start location), Show revival graphics
      • Unit Group - Pick every unit in (Units in Arena 1 <gen> owned by (Owner of (Dying unit))) and do (Actions)
        • Loop - Actions
          • Unit - Move (Picked unit) instantly to ((Owner of (Dying unit)) start location)
      • Wait 0.10 seconds
      • Game - Display to (All players) the text: ((Proper name of (Dying unit)) + Has Died, you will be instantly moved to)
      • Wait 2.00 seconds
      • Unit Group - Pick every unit in (Units in Arena 1 <gen>) and do (Actions)
        • Loop - Actions
          • Unit - Move (Picked unit) instantly to (Position of Goblin Merchant 0040 <gen>)

Assuming only two teams in the arena.

Edit: Addition of course you would do a classification check of A Hero if you have more than one hero unit per team you don't want the winner to win by killing a footman - you want the death of A Hero to trigger this.
 
Level 7
Joined
Sep 7, 2006
Messages
97
Thanks for all the replies!

Every time a hero dies, run a check to see if everyone else on that hero's team is dead. If they are, declare the other team the victors and return them via move actions to their respective bases.

Could you show me the triggers for this? It would be just what i needed.

And Wraithwynd

Your trigger was good but my units in the arena are heroes (i know i never said that) and they dont have a dying animation so (Arena 1 <gen> contains (Dying unit)) Equal to True. Wont work

And in your second trigger the other team just needs to kill one hero to win.... I want them to kill all the other teams heroes (6) before they win :grin:.

But great trigger otherwise.
 
Level 35
Joined
Oct 9, 2006
Messages
6,394
Could you show me the triggers for this? It would be just what i needed.

And Wraithwynd

Your trigger was good but my units in the arena are heroes (i know i never said that) and they dont have a dying animation so (Arena 1 <gen> contains (Dying unit)) Equal to True. Wont work

And in your second trigger the other team just needs to kill one hero to win.... I want them to kill all the other teams heroes (6) before they win :grin:.

But great trigger otherwise.

Well, it would work, as dying unit, has nothing to do with death animation. But you could also just say:
  • Revive Player Heroes
  • Events
    • Unit - A Unit dies
  • Conditions
    • ((Triggering unit) is A Hero) equal to true
  • Actions
    • If then Else Action
      • If - Conditions
        • Triggering unit belongs to an ally of (player red) equal to true
      • Then -Actions
        • Unit - Instantly move (triggering unit) to (team 1 base (region))
      • Else - Actions
    • If then Else Action
      • If - Conditions
        • Triggering unit belongs to an ally of (player yellow) equal to true
      • Then - Actions
        • Unit - Instantly move (Triggering unit) to (team 2 base (region))
      • Else - Actions
        • Do nothing
For the one you asked for before:
  • Victory Team 1
  • Events
    • Unit - A Unit dies
  • Conditions
    • And - All (Conditions) are true
      • Condition
        • ((Triggering unit) is A Hero) equal to true
        • (Number of units in (Units in (Arena Area Region)((Owner of (Matching unit)) Equal to (Random player from (All allies of Player 1 (Red)))))) Equal to 6
  • Actions
    • Game - Display to (All allies of Player 1 (Red)) for 20.00 seconds the text: Victory!
    • Unit Group - Pick every unit in (Units in (Arena Area Region)) and do (Unit - Move (Picked unit) instantly to (Center of (Team 1 Region))
Here you go
The number of 6 units to get this to work you can just change. To get this to work for other team, just change the ally of player red to: ally of player (from other team).
 
Level 7
Joined
Sep 7, 2006
Messages
97
Thanks just a question, how did u do all does triggers? the closest is shown on image.

Cause the trigger that is shown did'nt work
 

Attachments

  • need help.jpg
    need help.jpg
    25.4 KB · Views: 80
Level 7
Joined
Sep 7, 2006
Messages
97
AS I see on that picture: Your counting units in region 006, but moving them from region 005...

Yes its becuse the forces that lose gets revived in region 006 (another trigger i had before this thread) and the other force (winners) gets moved from the Arena which is 005 to red's starting Location.....
 
Level 35
Joined
Oct 9, 2006
Messages
6,394
Yes its becuse the forces that lose gets revived in region 006 (another trigger i had before this thread) and the other force (winners) gets moved from the Arena which is 005 to red's starting Location.....

Hmm... not what I made trigger for but shuold still work...

Hmm does it work for one of the teams? if so then you just didnt made for both teams, but proably not likely
 
Level 7
Joined
Sep 7, 2006
Messages
97
No i made for both teams... thats not the problem i've checked.

Arrgh i really need to make his trigger work or else this is the second arena i give up for that damn trigger.
 
Level 35
Joined
Oct 9, 2006
Messages
6,394
No i made for both teams... thats not the problem i've checked.

Arrgh i really need to make his trigger work or else this is the second arena i give up for that damn trigger.

Hmm then I can think of two things whch might be it...

1: It could be the random player from allies of player 1 (red) which doesnt work, and should be replaced by unit group id insted or similar.

2: It could be if they aint reviveing proably in the revive zone, and therefor isnt counted correctly.
 
Level 7
Joined
Sep 7, 2006
Messages
97
Hmm Ye it could be something with the reviving cause i have a very simple one here and yes have one for every player ofc.

Maybe i should try your revival trigger but im not certain how to do the trigger...

And if it doesent make a difference ill try your 1. idea

Edit: Yes! I made it work after redoing the triggers smother and making the counted number 5 instead of 6 in trigger.
 

Attachments

  • more help.bmp
    228.7 KB · Views: 66
Last edited:
Status
Not open for further replies.
Top