Arena System, helpppp!

Glorn2

Slap n' Tickle
Reaction score
4
I am having a really rough time figuring out how to make this arena system. What I want is for it to pick an equal number of random players from all teams to compete in the arena... And this number cannot be higher than the number of players on the smallest team.

I can set one up for full team duels, and 1v1 fights... But the whole "equal number not exceeding the smallest team" is what is getting me. Anyone know how I could do this?
 

Glorn2

Slap n' Tickle
Reaction score
4
I need help making a dueling/arena system.

There are either 2 or 4 teams, containing up to 6 players in 6v6, and up to 3 players in 3v3v3v3.

I need a "pick" system that will pick heroes from every team to fight in the arena.

conditions:
An equal number of players from every team must be picked. So, if it starts off as a 3v3v3v3, and 2 players leave team 4; it will only pick 1 RANDOM player from each team. If there are 2 players on the team with fewest players, I want it to pick 2 from every team, at random.

What I want is for it to pick an equal number of random players from all teams to compete in the arena... And this number cannot be higher than the number of players on the smallest team

That is about as clear as I can make it.

to rephrase again, I need a system that will pick X number of random players heroes to compete in there arena, where X is the number of players on the smallest team.
 

Moridin

Snow Leopard
Reaction score
144
To get the number of players in the smallest team:

Have an integer variable, say - Small_Team
Then do this

Player Group - Pick all Players in Team 1 and do multiple actions -
Loop -
Set Small_Team = Small_Team + 1

This will count the number of players in Team 1 (so long as Small_Team is originally 0).

You can also set arrays for it to count multiple teams and compare the values to FIND the smallest team.
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
This trigger will give you the number of players on the smaller team, you just need to make an interger varible. You will need to make player group varibles for each team however and add the players to them, which is a good thing cause it will also come in handy for a lot of your triggers.

Trigger:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Number of players in (Team_1)) Less than (Number of players in (Team_2))
    • Then - Actions
      • Set Interger = (Number of players in (Team_1))
    • Else - Actions
      • Set Interger = (Number of players in (Team_2)))


The triggers are kinda old and leak, but this map has a pretty nice dueling system.
http://www.epicwar.com/maps/20136/

You can use this to check for the min players on 4 teams


Trigger:
  • Events
    • Conditions
    • Actions
      • Set Interger = (Number of players in Teams[1])
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Interger Greater than (Number of players in Teams[((Integer A) + 1)])
            • Then - Actions
              • Set Interger = (Number of players in Teams[((Integer A) + 1)])
            • Else - Actions
 

Glorn2

Slap n' Tickle
Reaction score
4
I am actually using Malt's system to clean up all GUI triggers... It is cheap, but works amazingly.

I had actually started working on what you suggested, I got the idea from the above post; I already had the player groups made for my 4 team mode, so wanted to try to use them.

here is what I got so far:
Trigger:
  • Four Team Mode
    • Events
    • Conditions
    • Actions
      • Player Group - Add Player 1 (Red) to Team1
      • Player Group - Add Player 2 (Blue) to Team1
      • Player Group - Add Player 3 (Teal) to Team1
      • Player Group - Add Player 4 (Purple) to Team3
      • Player Group - Add Player 5 (Yellow) to Team3
      • Player Group - Add Player 6 (Orange) to Team3
      • Player Group - Add Player 7 (Green) to Team2
      • Player Group - Add Player 8 (Pink) to Team2
      • Player Group - Add Player 9 (Gray) to Team2
      • Player Group - Add Player 10 (Light Blue) to Team4
      • Player Group - Add Player 11 (Dark Green) to Team4
      • Player Group - Add Player 12 (Brown) to Team4
      • Player Group - Make Team1 treat Team3 as an Enemy
      • Player Group - Make Team3 treat Team1 as an Enemy
      • Player Group - Make Team4 treat Team2 as an Enemy
      • Player Group - Make Team2 treat Team4 as an Enemy


Trigger:
  • Small Team Pick
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of players in Team1) Less than or equal to (Number of players in Team2)
          • (Number of players in Team1) Less than or equal to (Number of players in Team3)
          • (Number of players in Team1) Less than or equal to (Number of players in Team4)
        • Then - Actions
          • Set LowTeam = (Number of players in Team1)
          • Skip remaining actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of players in Team2) Less than or equal to (Number of players in Team1)
          • (Number of players in Team2) Less than or equal to (Number of players in Team3)
          • (Number of players in Team2) Less than or equal to (Number of players in Team4)
        • Then - Actions
          • Set LowTeam = (Number of players in Team2)
          • Skip remaining actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of players in Team3) Less than or equal to (Number of players in Team1)
          • (Number of players in Team3) Less than or equal to (Number of players in Team2)
          • (Number of players in Team3) Less than or equal to (Number of players in Team4)
        • Then - Actions
          • Set LowTeam = (Number of players in Team3)
          • Skip remaining actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of players in Team4) Less than or equal to (Number of players in Team1)
          • (Number of players in Team4) Less than or equal to (Number of players in Team2)
          • (Number of players in Team4) Less than or equal to (Number of players in Team3)
        • Then - Actions
          • Set LowTeam = (Number of players in Team4)
          • Skip remaining actions
        • Else - Actions


The above trigger is run before the first duel, and every time a player leaves the game. How does it look?
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
It looks good, a little rought but it will still work. :)
 

Glorn2

Slap n' Tickle
Reaction score
4
Okay, I have been frying my brain over this for a while, and cant figure out where I went wrong...

Trigger:
  • Small Team Pick 2T
    • Events
      • Time - Elapsed game time is 60.00 seconds
      • Player - Player 1 (Red) leaves the game
      • Player - Player 2 (Blue) leaves the game
      • Player - Player 3 (Teal) leaves the game
      • Player - Player 4 (Purple) leaves the game
      • Player - Player 5 (Yellow) leaves the game
      • Player - Player 6 (Orange) leaves the game
      • Player - Player 7 (Green) leaves the game
      • Player - Player 8 (Pink) leaves the game
      • Player - Player 9 (Gray) leaves the game
      • Player - Player 10 (Light Blue) leaves the game
      • Player - Player 11 (Dark Green) leaves the game
      • Player - Player 12 (Brown) leaves the game
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of players in Team1) Less than or equal to (Number of players in Team2)
        • Then - Actions
          • Set LowTeam = (Number of players in Team1)
        • Else - Actions
          • Set LowTeam = (Number of players in Team2)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • LowTeam Equal to 0
        • Then - Actions
          • Countdown Timer - Destroy ArenaStartTimer
          • Trigger - Turn off Timer Start <gen>
          • Trigger - Turn off Even Move To Arena <gen>
          • Trigger - Turn off Small Team <gen>
          • Trigger - Turn off Arena Ends <gen>
          • Trigger - Turn off Full Move to Arena <gen>
          • Trigger - Turn off (This trigger)
        • Else - Actions


That is what you have posted above; and I also made it so that all of my arena triggers would turn off if there is only 1 team left in the game. It runs whenever it may need to be updated.

Problem being, when I use my move to arena trigger, and my arena ends trigger... it doesn't work how it should...

Trigger:
  • Even Move To Arena Copy
    • Events
      • Time - ArenaStart expires
    • Conditions
    • Actions
      • Unit Group - Pick every unit in PlayerHeroes and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) belongs to an ally of Player 1 (Red)) Equal to True
            • Then - Actions
              • Hero - Instantly revive (Picked unit) at (Center of Temp Start <gen>), Hide revival graphics
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) belongs to an ally of Player 7 (Green)) Equal to True
            • Then - Actions
              • Hero - Instantly revive (Picked unit) at (Center of Temp Start 2 <gen>), Hide revival graphics
            • Else - Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) is A Hero) Equal to True) and (((Owner of (Matching unit)) is in Team1) Equal to True))) and do (Actions)
        • Loop - Actions
          • Unit - Move (Picked unit) instantly to (Center of Team 1 Start 2 <gen>)
          • Camera - Pan camera for (Owner of (Picked unit)) to (Position of (Picked unit)) over 0.00 seconds
          • Unit - Pause (Picked unit)
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) is A Hero) Equal to True) and (((Owner of (Matching unit)) is in Team2) Equal to True))) and do (Actions)
        • Loop - Actions
          • Unit - Move (Picked unit) instantly to (Center of Team 2 Start 2 <gen>)
          • Camera - Pan camera for (Owner of (Picked unit)) to (Position of (Picked unit)) over 0.00 seconds
          • Unit - Pause (Picked unit)
      • Wait 0.00 seconds
      • Unit Group - Pick every unit in (Random LowTeam units from (Units in Team 1 Start 2 <gen> matching (((Matching unit) is A Hero) Equal to True))) and do (Actions)
        • Loop - Actions
          • Unit - Move (Picked unit) instantly to (Center of Arena Team 1 <gen>)
          • Unit - Unpause (Picked unit)
          • Camera - Pan camera for (Owner of (Picked unit)) to (Position of (Picked unit)) over 0.00 seconds
      • Unit Group - Pick every unit in (Random LowTeam units from (Units in Team 2 Start 2 <gen> matching (((Matching unit) is A Hero) Equal to True))) and do (Actions)
        • Loop - Actions
          • Unit - Move (Picked unit) instantly to (Center of Arena Team 2 <gen>)
          • Unit - Unpause (Picked unit)
          • Camera - Pan camera for (Owner of (Picked unit)) to (Position of (Picked unit)) over 0.00 seconds


When the above trigger runs, rather than picking "Lowteam" number of random heroes, it picks... all of the heroes... I may simply be misunderstanding the concept of picking a random number of units.. but this is not working....

any thoughtttssss?
 

Glorn2

Slap n' Tickle
Reaction score
4
Alright, I have figured this out; kinda. I got it to finally get an even number of heroes in the arena for a 2 team mode. Had to re-word some things; and set the players being added to groups to if/then statements. It is a little sloppy, but with leak cleaning, and the trigger rarely being run I dont see a problem with it. If anyone is interested in the fixed trigger, just ask and I can post it.
 
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