Status
Not open for further replies.

#### bkdud_32

Level 6
Im making a map that has a tournament in it and I can figure out everything but how to make the unit that entered into the tournament first and the unit that entered second be the first two to fight and the third to enter would be in the second round and so on and so forth. Can someone tell/show me how to make a GUI trigger that can do that?

#### GhostWolf

Level 29
*A player chooses a unit* (whatever your event is)

If Unit[1] = No Unit
Set Unit[1] = ChosenUnit
Skip Remaining Actions

If Unit[2] = No Unit
Set Unit[2] = ChosenUnit
Skip Remaining Actions

Etc.
Of course this can be made in a really short loop.

#### Nodrek

Level 4
• Melee Initialization
• Events
• Unit - A unit enters Region1 (the region which will trigger the tournament event)
• Conditions
• Actions
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• (Number of units in (Region1))) Equal to 0 (Region1 = region where your players will be teleported from to the battle area)
• Then - Actions
• Unit - Move (Triggering unit) instantly to (Center of (Region2)) (Region2 = Battle area)
• Else - Actions
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• (Number of units in (Units in (Region2))) Equal to 2
• Then - Actions
• Unit - Move (Triggering unit) instantly to (Center of (Region3)) (Where Region3 is the region where the other players will wait for the other fighting players to finish
• Else - Actions
You can also add a variable
• Set x = (Number of units in (Units in (Region)))
so you can count the players in the region with it and then if the variable is equal to 2 (desired no. of players to fight together) then
• Unit - Move (Triggering unit) instantly to (Center of (Region3)) (Where Region3 is the region where the other players will wait for the other fighting players to finish
• Else - Actions

#### bkdud_32

Level 6
Ghostwolf could you plz show me how you would make your trigger with a loop?

#### GhostWolf

Level 29
• Actions
• For each (Integer A) from 1 to maximum_Number_Of_Units, do (Actions)
• Loop - Actions
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• Unit[(Integer A)] Equal to No unit
• Then - Actions
• Set Unit[(Integer A)] = (Triggering unit)
• Skip remaining actions
• Else - Actions

#### bkdud_32

Level 6
Ok thanks guys, but now I need to know how to reset alliances to how they were before the tournament, as in when a hero dies in the tournament it resets the alliance that player had with all the other players.

#### GhostWolf

Level 29
You mean something like this ?

• Bla
• Events
• Unit - A unit Dies
• Conditions
• Conditions
• Actions
• For each (Integer A) from 1 to 10, do (Actions)
• Loop - Actions
• Player - Make (Owner of (Triggering unit)) treat (Player((Integer A))) as an Ally with shared vision

#### bkdud_32

Level 6
no i mean like if two allied players enter the tournament when they fight they would be unallied for only that fight then be allied again.

#### GhostWolf

Level 29
Well just make them enemys in your fight trigger and when one dies make them allies.

If you want it to be more specific, post your fighting trigger.

#### bkdud_32

Level 6
never mind i figured it out thnx for help though

Status
Not open for further replies.

[Trigger] Tournament System
Replies
2
Views
872
Replies
1
Views
1K
[Trigger] Hero Tournament
Replies
7
Views
665
Replies
0
Views
379