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!
 
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.)
 
I have no idea how that trigger would work ...seems a little to wordy for me to understain. Whould it work for team duels?
 
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.)
 
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.
 
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)
 
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 :)
 
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 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
 
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
 
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
 
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?
 
Heres my Map ^^
 

Attachments

  • Kingdom Was 1.2.w3x
    211.9 KB · Views: 144
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.
 
"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 The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top