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: 142

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.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top