Team Duel

garion992

TH.net Regular
Reaction score
17
Hello everyone!
I have a map like footman frenzy, its pretty good and fun.
But i tried to make a Duel Arena in the map, so every 180 secs all heroes must duel there.
I tried a lot and searched much and i only founded triggers for 2 teams. It would be nice if this became a tutorial.

Wat i want: (but it doesnt works)
  • Every 180 seconds move all heroes to the arena at full health, revive when dead.
  • Must be suitable for 4 teams with 2 players in each team.
  • If team mate has left or is defeated, the arena must still work for other players, so my team mate left and other players kill me that they dont need to kill the teammate who has left so who is impossible to kill.
  • Give the 2 or 1 winning player(s) a reward and move them back to the base.
  • You can have more then 1 Hero in this map, but only the first must be possible to enter the Arena.

My old Triggers: (it will be better to not look at those)
Code:
Timer
    Events
        Time - Elapsed game time is 5.00 seconds
    Conditions
    Actions
        Countdown Timer - Start ArenaTimer as a One-shot timer that will expire in 180.00 seconds
        Countdown Timer - Create a timer window for ArenaTimer with title Duel Time: 
        Countdown Timer - Show AreanTimerWindow
Code:
Go to Arena
    Events
        Time - ArenaTimer expires
    Conditions
    Actions
        Game - Display to (All players) the text: It's time to Duel! ...
        Set DuelBoolean = True
        Set ArenaLives[1] = (2 - Left[1])
        Set ArenaLives[2] = (2 - Left[2])
        Set ArenaLives[3] = (2 - Left[3])
        Set ArenaLives[4] = (2 - Left[4])
        For each (Integer A) from 1 to 8, do (Actions)
            Loop - Actions
                Hero - Instantly revive Heroes[(Integer A)] at (Center of ArenaAreas[(Integer A)]), Show revival graphics
                Unit - Move Heroes[(Integer A)] instantly to (Center of ArenaAreas[(Integer A)])
                Camera - Pan camera for (Player((Integer A))) to (Position of Heroes[(Integer A)]) over 1.00 seconds
Code:
// This one is really bad i know, but it sets the variables lower if a unit dies and checks if the team has won
Winning Players
    Events
        Unit - A unit Dies
    Conditions
        And - All (Conditions) are true
            Conditions
                DuelBoolean Equal to True
                ((Triggering unit) is A Hero) Equal to True
                (Hero Arena <gen> contains (Triggering unit)) Equal to True
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Owner of (Triggering unit)) Equal to Player 1 (Red)) or ((Owner of (Triggering unit)) Equal to Player 2 (Blue))
            Then - Actions
                Set ArenaLives[1] = (ArenaLives[1] - 1)
                Game - Display to (All players) the text: (A Hero of Team 1 has fallen! Lives:  + (String(ArenaLives[1])))
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        And - All (Conditions) are true
                            Conditions
                                ArenaLives[1] Equal to 0
                                ArenaLives[3] Equal to 0
                                ArenaLives[4] Equal to 0
                    Then - Actions
                        Set IntWinner = 2
                        Trigger - Run Reward <gen> (ignoring conditions)
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                And - All (Conditions) are true
                                    Conditions
                                        ArenaLives[1] Equal to 0
                                        ArenaLives[2] Equal to 0
                                        ArenaLives[4] Equal to 0
                            Then - Actions
                                Set IntWinner = 3
                                Trigger - Run Reward <gen> (ignoring conditions)
                            Else - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        And - All (Conditions) are true
                                            Conditions
                                                ArenaLives[1] Equal to 0
                                                ArenaLives[2] Equal to 0
                                                ArenaLives[3] Equal to 0
                                    Then - Actions
                                        Set IntWinner = 4
                                        Trigger - Run Reward <gen> (ignoring conditions)
                                    Else - Actions
                                        Do nothing
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Owner of (Triggering unit)) Equal to Player 3 (Teal)) or ((Owner of (Triggering unit)) Equal to Player 4 (Purple))
                    Then - Actions
                        Set ArenaLives[2] = (ArenaLives[2] - 1)
                        Game - Display to (All players) the text: A Hero of Team 2 ha...
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                And - All (Conditions) are true
                                    Conditions
                                        ArenaLives[2] Equal to 0
                                        ArenaLives[3] Equal to 0
                                        ArenaLives[4] Equal to 0
                            Then - Actions
                                Set IntWinner = 1
                                Trigger - Run Reward <gen> (ignoring conditions)
                            Else - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        And - All (Conditions) are true
                                            Conditions
                                                ArenaLives[1] Equal to 0
                                                ArenaLives[2] Equal to 0
                                                ArenaLives[4] Equal to 0
                                    Then - Actions
                                        Set IntWinner = 3
                                        Trigger - Run Reward <gen> (ignoring conditions)
                                    Else - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                And - All (Conditions) are true
                                                    Conditions
                                                        ArenaLives[1] Equal to 0
                                                        ArenaLives[2] Equal to 0
                                                        ArenaLives[3] Equal to 0
                                            Then - Actions
                                                Set IntWinner = 4
                                                Trigger - Run Reward <gen> (ignoring conditions)
                                            Else - Actions
                                                Do nothing
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Owner of (Triggering unit)) Equal to Player 5 (Yellow)) or ((Owner of (Triggering unit)) Equal to Player 6 (Orange))
                            Then - Actions
                                Set ArenaLives[3] = (ArenaLives[3] - 1)
                                Game - Display to (All players) the text: A Hero of Team 3 ha...
                                -------- XXXXXXXXXXXXXXX --------
                                -------- XXXXXXXXXXXXXXX --------
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        And - All (Conditions) are true
                                            Conditions
                                                ArenaLives[2] Equal to 0
                                                ArenaLives[3] Equal to 0
                                                ArenaLives[4] Equal to 0
                                    Then - Actions
                                        Set IntWinner = 1
                                        Trigger - Run Reward <gen> (ignoring conditions)
                                    Else - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                And - All (Conditions) are true
                                                    Conditions
                                                        ArenaLives[1] Equal to 0
                                                        ArenaLives[3] Equal to 0
                                                        ArenaLives[4] Equal to 0
                                            Then - Actions
                                                Set IntWinner = 2
                                                Trigger - Run Reward <gen> (ignoring conditions)
                                            Else - Actions
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        And - All (Conditions) are true
                                                            Conditions
                                                                ArenaLives[1] Equal to 0
                                                                ArenaLives[2] Equal to 0
                                                                ArenaLives[3] Equal to 0
                                                    Then - Actions
                                                        Set IntWinner = 4
                                                        Trigger - Run Reward <gen> (ignoring conditions)
                                                    Else - Actions
                                                        Do nothing
                            Else - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        ((Owner of (Triggering unit)) Equal to Player 7 (Green)) or ((Owner of (Triggering unit)) Equal to Player 8 (Pink))
                                    Then - Actions
                                        Set ArenaLives[4] = (ArenaLives[4] - 1)
                                        Game - Display to (All players) the text: A Hero of Team 4 ha...
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                And - All (Conditions) are true
                                                    Conditions
                                                        ArenaLives[2] Equal to 0
                                                        ArenaLives[3] Equal to 0
                                                        ArenaLives[4] Equal to 0
                                            Then - Actions
                                                Set IntWinner = 1
                                                Trigger - Run Reward <gen> (ignoring conditions)
                                            Else - Actions
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        And - All (Conditions) are true
                                                            Conditions
                                                                ArenaLives[1] Equal to 0
                                                                ArenaLives[3] Equal to 0
                                                                ArenaLives[4] Equal to 0
                                                    Then - Actions
                                                        Set IntWinner = 2
                                                        Trigger - Run Reward <gen> (ignoring conditions)
                                                    Else - Actions
                                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                            If - Conditions
                                                                And - All (Conditions) are true
                                                                    Conditions
                                                                        ArenaLives[1] Equal to 0
                                                                        ArenaLives[2] Equal to 0
                                                                        ArenaLives[4] Equal to 0
                                                            Then - Actions
                                                                Set IntWinner = 3
                                                                Trigger - Run Reward <gen> (ignoring conditions)
                                                            Else - Actions
                                                                Do nothing
                                    Else - Actions
                                        Game - Display to (All players) the text: - test: Unit isn't ...
Code:
Reward
    Events
    Conditions
    Actions
        Game - Display to (All players) the text: (|cffff8c00Team  + ((String(IntWinner)) + |r wins the Duel! Pick up your rewards in the middle!))
        Hero - Create ArenaDuelSets[(Random integer number between 1 and 5)] and give it to Heroes[((IntWinner + IntWinner) - 1)]
        Hero - Create ArenaDuelSets[(Random integer number between 1 and 5)] and give it to Heroes[(IntWinner + IntWinner)]
        Game - Display to (All players) the text: Arena will end in 1...
        Set DuelBoolean = False
        Wait 15.00 seconds
        Countdown Timer - Start ArenaTimer as a One-shot timer that will expire in 300.00 seconds
        Unit - Move Heroes[((IntWinner + IntWinner) - 1)] instantly to ((Player(((IntWinner + IntWinner) - 1))) start location)
        Camera - Pan camera for (Player(((IntWinner + IntWinner) - 1))) to (Position of Heroes[((IntWinner + IntWinner) - 1)]) over 1.00 seconds
        Unit - Move Heroes[(IntWinner + IntWinner)] instantly to ((Player((IntWinner + IntWinner))) start location)
        Camera - Pan camera for (Player((IntWinner + IntWinner))) to (Position of Heroes[(IntWinner + IntWinner)]) over 1.00 seconds
        Game - Display to (All players) the text: Arena mode is over!
Edit 16-07-07 20:35 - set to code tags
 

Darkchaoself

What is this i dont even
Reaction score
106
I refuse to help, thats barley readable, the third one, for *insert word here* sake, use code tags!
 

NapaHero

Back from the dead...
Reaction score
43
Agreed with Dark, use code tags so we can understand your trigger and try to help you.
 

Sevion

The DIY Ninja
Reaction score
413
Hey, don't feel bad. A lot of us forget Code Tags sometime in our forum life :p. I'll get back to you when I get this stupid driver. Right now scrolling is killing me. It looks terrible without my driver :p. I just reformatted.
 

garion992

TH.net Regular
Reaction score
17
A driver? Does it makes text better readable? Cool!
But take your time, im already building a month on this map.

But dont get off the subject! :p
 

NapaHero

Back from the dead...
Reaction score
43
First thing:

Code:
Set ArenaLives[1] = (2 - Left[1])
Set ArenaLives[2] = (2 - Left[2])
Set ArenaLives[3] = (2 - Left[3])
Set ArenaLives[4] = (2 - Left[4])

could be shortened to:

Code:
For Each (Integer A) from 1 to 4, do (Actions):
   Loop - Actions
      Set Arena Lives[Integer A] = (2 - Left[IntegerA])
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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 The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      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