Arena Win

B

Burezu

Guest
I am making an arena and i need help with the triggers that end the match and move the heroes back to their starting position. I have already tried doing this but failed. If you would like to help me make a new trigger or help fix my current one just ask me.

Thxs for the help!
 

snowtiger

New Member
Reaction score
1
You win by killing all other hero's dont you?
I suggest this:
Hero Win
Events
Unit - A unit Dies
Conditions
(Number of units in (Units in (Playable map area) matching (((Owner of (Matching unit)) is an enemy of (Owner of (Attacking unit))) Equal to True))) Equal to 0
Actions
Unit - Move (Attacking unit) instantly to (Center of Make a region where the unit should start.)
 
B

Burezu

Guest
I have no idea how that trigger would work ...seems a little to wordy for me to understain. Whould it work for team duels?
 

snowtiger

New Member
Reaction score
1
It would work if it was FFA. Can you upload the map so i can see what to do?

Events
Unit - A unit Dies
-Well... A unit dies :p -
Conditions
(Number of units in (Units in (Playable map area) matching (((Owner of (Matching unit)) is an enemy of (Owner of (Attacking unit))) Equal to True))) Equal to 0
-counts number of units in the map that mach a condition -
-condition is that the owner of that unit is an anemy of killing unit-
-if that number is 0 (all enemys of killer are dead -> he wins) -
-we execute the actions ( move him to an area) -

Actions
Unit - Move (Attacking unit) instantly to (Center of Make a region where the unit should start.)
 
B

Burezu

Guest
Sorry it took me so long, i was plaing SC with my friend heres my arena triggers.

Code:
Arena
    Events
        Time - ArenaTimer expires
    Conditions
    Actions
        For each (Integer A) from 2 to 6, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                    Then - Actions
                        Unit - Set life of Heroes[(Integer A)] to 100.00%
                        Unit - Move Heroes[(Integer A)] instantly to (Center of Arena Spawn 1 <gen>)
                        Unit - Set mana of Heroes[(Integer A)] to 100.00%
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) is dead) Equal to True
                    Then - Actions
                        Hero - Instantly revive Heroes[(Integer A)] at (Center of Arena Spawn 1 <gen>), Hide revival graphics
                        Unit - Set mana of Heroes[(Integer A)] to 100.00%
                    Else - Actions
                        Do nothing
                Set ArenaTeam1 = (ArenaTeam1 + 1)
        For each (Integer A) from 8 to 12, do (Actions)
            Loop - Actions
                Unit - Move Heroes[(Integer A)] instantly to (Center of Arena Spawn 2 <gen>)
                Unit - Set life of Heroes[(Integer A)] to 100.00%
                Unit - Set mana of Heroes[(Integer A)] to 100.00%
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) is dead) Equal to True
                    Then - Actions
                        Hero - Instantly revive Heroes[(Integer A)] at (Center of Arena Spawn 2 <gen>), Hide revival graphics
                        Unit - Set mana of Heroes[(Integer A)] to 100.00%
                    Else - Actions
                        Do nothing
                Set ArenaTeam2 = (ArenaTeam2 + 1)
        Trigger - Turn on Team 1 Win <gen>
        Trigger - Turn on Team 2 Win <gen>

Code:
Score Counter
    Events
        Unit - A unit Dies
    Conditions
        (Arena <gen> contains (Killing unit)) Equal to True
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Dying unit) belongs to an ally of Player 2 (Blue)) Equal to True
            Then - Actions
                Set ArenaTeam1 = (ArenaTeam1 - 1)
            Else - Actions
                Set ArenaTeam2 = (ArenaTeam2 - 1)

Code:
Team 1 Win
    Events
        Unit - A unit Dies
    Conditions
        ArenaTeam2 Equal to 0
    Actions
        For each (Integer A) from 1 to 6, do (Actions)
            Loop - Actions
                Hero - Set Heroes[(Integer A)] experience to 1000, Show level-up graphics
                Player - Add 1000 to (Picked player) Current gold
        Unit Group - Pick every unit in (Units in Arena <gen>) and do (Unit - Move (Picked unit) instantly to ((Picked player) start location))
        Countdown Timer - Start ArenaTimer as a One-shot timer that will expire in (60.00 x 10.00) seconds
        Trigger - Turn off Team 2 Win <gen>
        Trigger - Turn off (This trigger)

I have a feeling that i am using the Varaibles wong.
-ArenaTeam1
-ArenaTeam2
I dont know if they are being set wrong or if they are the wrong type. Right now they are intger variables.
 

snowtiger

New Member
Reaction score
1
at first glimps i saw this:
Code:
Arena
    Events
        Time - ArenaTimer expires
    Conditions
    Actions
        For each (Integer A) from 2 to 6, do (Actions)
            Loop - Actions
                [b]If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                    Then - Actions
                        Unit - Set life of Heroes[(Integer A)] to 100.00%
                        Unit - Move Heroes[(Integer A)] instantly to (Center of Arena Spawn 1 <gen>)
                        Unit - Set mana of Heroes[(Integer A)] to 100.00%
                    Else - Actions[/b]
[COLOR="Blue"]why are you using an if/then/else statement here?[/COLOR]
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions[b]
                        ((Picked unit) is dead) Equal to True[/b]
[COLOR="Blue"]you don't pick a unit, so this condition is ignored by warcraft[/COLOR]
                    Then - Actions
                        Hero - Instantly revive Heroes[(Integer A)] at (Center of Arena Spawn 1 <gen>), Hide revival graphics
                        Unit - Set mana of Heroes[(Integer A)] to 100.00%
                    Else - Actions
                        [b]Do nothing[/b]
[COLOR="Blue"]You can remove this code :)[/COLOR]
                Set ArenaTeam1 = (ArenaTeam1 + 1)
        For each (Integer A) from 8 to 12, do (Actions)
            Loop - Actions
                Unit - Move Heroes[(Integer A)] instantly to (Center of Arena Spawn 2 <gen>)
                Unit - Set life of Heroes[(Integer A)] to 100.00%
                Unit - Set mana of Heroes[(Integer A)] to 100.00%
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        [b]((Picked unit) is dead) Equal to True[/b]
[COLOR="Blue"]same thing here[/COLOR]
                    Then - Actions
                        Hero - Instantly revive Heroes[(Integer A)] at (Center of Arena Spawn 2 <gen>), Hide revival graphics
                        Unit - Set mana of Heroes[(Integer A)] to 100.00%
                    Else - Actions
                        Do nothing
              [B]  Set ArenaTeam2 = (ArenaTeam2 + 1)[/B][COLOR="Blue"]
What does this line of code do?[/COLOR]
        Trigger - Turn on Team 1 Win <gen>
        Trigger - Turn on Team 2 Win <gen>

I hope I can help you :)


Oh and is it possible to upload your map? Then I could try to fix it on the map itself :)

(post reply -> manage attatchments)
 

FroznYoghurt

New Member
Reaction score
37
Code:
    Events
        Unit - A unit Dies
    Conditions
        ArenaTeam2 Equal to 0
    Actions
        For each (Integer A) from 1 to 6, do (Actions)
            Loop - Actions
                Hero - Set Heroes[(Integer A)] experience to 1000, Show level-up graphics
                Player - Add 1000 to [COLOR="Red"](Picked player) [/COLOR]Current gold
        Unit Group - Pick every unit in (Units in Arena <gen>) and do (Unit - Move (Picked unit) instantly to [COLOR="Red"]((Picked player) start location))[/COLOR] [B](Same thing again, no player is picked)[/B]
        Countdown Timer - Start ArenaTimer as a One-shot timer that will expire in (60.00 x 10.00) seconds
        Trigger - Turn off Team 2 Win <gen>
        Trigger - Turn off (This trigger)

"Picked" refers to unit/players picked in the "pick all..." loop action
If wc3 cant refer to anything the whole thing is canceled :Z
Pretty much what snowtiger said but he posted while i was writing :)
 
B

Burezu

Guest
How do i upload maps :p. The If/Then/Else Statment is so that if a hero is dead when the arena starts it will rez it at the arena starting position.
 

snowtiger

New Member
Reaction score
1
:) i was still getting some bugs out of the code. But it is a lot easier to be able to change the code while debugging :D
 

snowtiger

New Member
Reaction score
1
How do i upload maps :p. The If/Then/Else Statment is so that if a hero is dead when the arena starts it will rez it at the arena starting position.

I mean the if then else statement above that one

Click on the button: post reply, or the button Go advanced. Then scroll down a bit untill you see manage attatchments
 

FroznYoghurt

New Member
Reaction score
37
But i think snowtiger is saying is that its no meaning using an ifthenelse if you have no condition...

Code:
       For each (Integer A) from 2 to 6, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  [B][SIZE="2"]  If - Conditions
                  (Here, there are no conditions) [/SIZE][/B] 
                    Then - Actions
                        Unit - Set life of Heroes[(Integer A)] to 100.00%
                        Unit - Move Heroes[(Integer A)] instantly to (Center of Arena Spawn 1 <gen>)
                        Unit - Set mana of Heroes[(Integer A)] to 100.00%
                    Else - Actions
 
B

Burezu

Guest
Opps lol i dident see that. I was experimenting and i gess i forgot to remove it. I dont think that would effect my trigger would it?
 
B

Burezu

Guest
Heres my Map ^^
 

Attachments

  • Kingdom Was 1.2.w3x
    211.9 KB · Views: 144

snowtiger

New Member
Reaction score
1
I'll upload a working map as soon as i finish it :)
I've saved some things, I'm going to test it.


Edit: I'm going to continue tomorrow. Going to sleep now.
 
B

Burezu

Guest
"Picked" refers to unit/players picked in the "pick all..." loop action
If wc3 cant refer to anything the whole thing is canceled :Z
Pretty much what snowtiger said but he posted while i was writing :)

Ok I changed all the picked unit/player to player[IntegerA] and the variable Heroes[IntegerA], but it still wouldn't work did I do it wrong again?:banghead:

Its nice that you are trying to help me Snowtiger:) but i would prefer if you would tell me how to fix the problem so i could learn next time, instead of you fixing it for me and handing it back complete, not knowing how its done.:confused:

Thank you for your help so far.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top