Having trouble with Multiboard and Timers

Eyonix

TH.net Regular
Reaction score
16
Im making a King of the Hill map, and if you control the hill for so long you win.

but my multiboard won't add all the players to it, it adds red and then adds blue but no one else....

Also my other problem is when a unit leaves the area even if you are the only one on the hill and have like 5 more units on it, the timer still stops.

Heres the triggers, sorry they are pretty long.
I think the problems are in the 2nd and 4th trigger, but im not sure because I didn't make this trigger.
Trigger:
  • Map Initialization for Muiltiboard
    • Events
      • Map initialization
    • Conditions
    • Actions
      • For each (Integer A) from 1 to (Number of players in (All players controlled by a User player)), do (Actions)
        • Loop - Actions
          • Set timeKeeper[(Player number of ownerOfMostUnits)] = 300
      • Set Players_Playing = (All players matching (((Matching player) slot status) Equal to Is playing))
      • -------- Gold Color --------
      • Set Players_ColorCodes[0] = |cffffcc00
      • -------- Players Colors --------
      • Set Players_ColorCodes[1] = |c00ff0303
      • Set Players_ColorCodes[2] = |c000042ff
      • Set Players_ColorCodes[3] = |c001ce6b9
      • Set Players_ColorCodes[4] = |c00540081
      • Set Players_ColorCodes[5] = |c00fffc01
      • Set Players_ColorCodes[6] = |c00feba0e
      • Set Players_ColorCodes[7] = |c0020c000
      • Set Players_ColorCodes[8] = |c00e55bb0
      • Set Players_ColorCodes[9] = |cFF7EBFF1
      • Set Players_ColorCodes[10] = |cFF106246
      • Set Players_ColorCodes[11] = |CFF4E2A04
      • Set Players_ColorCodes[12] = |cFF4E2A04
      • Set ColorCodes_EndTag = |r
      • Set Tier[Player_Number] = 1

Trigger:
  • Create MultiBoard
    • Events
      • Time - Elapsed game time is 0.03 seconds
    • Conditions
    • Actions
      • Leaderboard - Create a leaderboard for (All players controlled by a User player) titled ownerOfMostNumberOf...
      • Set leaderBoardTimerKeeper = (Last created leaderboard)
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Leaderboard - Add (Picked player) to leaderBoardTimerKeeper with label (Name of (Picked player)) and value (Number of units in (Units within 5000.00 of (Center of Hill <gen>) matching (((Matching unit) is alive) Equal to True))) Leaderboard - Hide leaderBoardTimerKeeper
      • -------- Column 1 --------
      • Multiboard - Create a multiboard with 4 columns and (1 + (Number of players in Players_Playing)) rows, titled Score
      • Set Multiboard = (Last created multiboard)
      • Multiboard - Hide Multiboard
      • Multiboard - Set the text for Multiboard item in column 1, row 1 to (Players_ColorCodes[0] + ([Players] + ColorCodes_EndTag))
      • Multiboard - Set the text for Multiboard item in column 2, row 1 to (Players_ColorCodes[0] + ([Tier] + ColorCodes_EndTag))
      • Multiboard - Set the text for Multiboard item in column 3, row 1 to (Players_ColorCodes[0] + ([Kills] + ColorCodes_EndTag))
      • Multiboard - Set the text for Multiboard item in column 4, row 1 to (Players_ColorCodes[0] + ([Time In Control] + ColorCodes_EndTag))
      • -------- Width --------
      • Multiboard - Set the width for Multiboard item in column 1, row 0 to 7.00% of the total screen width
      • Multiboard - Set the width for Multiboard item in column 2, row 0 to 4.00% of the total screen width
      • Multiboard - Set the width for Multiboard item in column 3, row 0 to 4.00% of the total screen width
      • Multiboard - Set the width for Multiboard item in column 4, row 0 to 9.00% of the total screen width
      • For each (Integer A) from 1 to (Number of players in Players_Playing), do (Actions)
        • Loop - Actions
          • -------- Adding Players --------
          • Set Player_Row = (Player_Row + 1)
          • Set playerRow[(Integer A)] = (Player((Integer A)))
          • Set Player_Color = (Player_Color + 1)
          • Multiboard - Set the text for Multiboard item in column 1, row Player_Row to (Players_ColorCodes[Player_Color] + ((Name of (Player(Player_Color))) + ColorCodes_EndTag))
          • -------- Tier --------
          • Multiboard - Set the text for Multiboard item in column 2, row Player_Row to (Players_ColorCodes[Player_Color] + ((String(Tier[Player_Number])) + ColorCodes_EndTag))
          • -------- Kills --------
          • Multiboard - Set the text for Multiboard item in column 3, row Player_Row to (Players_ColorCodes[Player_Color] + ((String(Kill_Count[Player_Number])) + ColorCodes_EndTag))
      • Multiboard - Set the display style for Multiboard item in column 0, row 0 to Show text and Hide icons
      • Multiboard - Show Multiboard

It was 1000 range but i changed it to 5000 and it still only adds red and blue, and all the players' units are the same distance away or pretty close to it.


Trigger:
  • Add To Kills
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Dying unit)) Not equal to (Owner of (Killing unit))
    • Actions
      • Set Kill_Count[Player_Number] = (Kill_Count[Player_Number] + 1)
      • Multiboard - Set the text for Multiboard item in column 3, row ((Player number of (Owner of (Killing unit))) + 1) to (Players_ColorCodes[Player_Color] + ((String(Kill_Count[Player_Number])) + ColorCodes_EndTag))


Trigger:
  • activateTimer
    • Events
      • Unit - A unit enters Hill <gen>
      • Unit - A unit leaves Hill <gen>
    • Conditions
    • Actions
      • Leaderboard - Sort leaderBoardTimerKeeper by Value in Descending order
      • Set ownerOfMostUnits = (Player in position 1 of leaderBoardTimerKeeper)
      • Unit Group - Pick every unit in (Units owned by ownerOfMostUnits) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Entering unit) is in (Units owned by ownerOfMostUnits)) Equal to True
            • Then - Actions
              • Trigger - Turn on timer <gen>
            • Else - Actions
              • Trigger - Turn off timer <gen>
      • Unit Group - Pick every unit in (Units owned by ownerOfMostUnits) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Leaving unit) is in (Units owned by ownerOfMostUnits)) Equal to True
            • Then - Actions
              • Trigger - Turn off timer <gen>
            • Else - Actions

Trigger:
  • timer
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Set timeMilisecs[(Player number of ownerOfMostUnits)] = (timeMilisecs[(Player number of ownerOfMostUnits)] + 1)
      • Set timeMilisecsString[(Player number of ownerOfMostUnits)] = (String(timeMilisecs[(Player number of ownerOfMostUnits)]))
      • Set timeSecondsString[(Player number of ownerOfMostUnits)] = (String(timeSeconds[(Player number of ownerOfMostUnits)]))
      • Set timeMinutesString[(Player number of ownerOfMostUnits)] = (String(timeMinutes[(Player number of ownerOfMostUnits)]))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • timeMilisecs[(Player number of ownerOfMostUnits)] Equal to 100
        • Then - Actions
          • Set timeMilisecs[(Player number of ownerOfMostUnits)] = 0
          • Set timeMilisecsString[(Player number of ownerOfMostUnits)] = (String(timeMilisecs[(Player number of ownerOfMostUnits)]))
          • Set timeSeconds[(Player number of ownerOfMostUnits)] = (timeSeconds[(Player number of ownerOfMostUnits)] + 1)
          • Set timeSecondsString[(Player number of ownerOfMostUnits)] = (String(timeSeconds[(Player number of ownerOfMostUnits)]))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • timeSeconds[(Player number of ownerOfMostUnits)] Equal to 60
        • Then - Actions
          • Set timeSeconds[(Player number of ownerOfMostUnits)] = 0
          • Set timeSecondsString[(Player number of ownerOfMostUnits)] = (String(timeSeconds[(Player number of ownerOfMostUnits)]))
          • Set timeMinutes[(Player number of ownerOfMostUnits)] = (timeMinutes[(Player number of ownerOfMostUnits)] + 1)
          • Set timeMinutesString[(Player number of ownerOfMostUnits)] = (String(timeMinutes[(Player number of ownerOfMostUnits)]))
        • Else - Actions
      • If ((Integer(timeMilisecsString[(Player number of ownerOfMostUnits)])) Less than 10) then do (Set timeMilisecsString[(Player number of ownerOfMostUnits)] = (0 + (String(timeMilisecs[(Player number of ownerOfMostUnits)])))) else do (Do nothing)
      • If ((Integer(timeSecondsString[(Player number of ownerOfMostUnits)])) Less than 10) then do (Set timeSecondsString[(Player number of ownerOfMostUnits)] = (0 + (String(timeSeconds[(Player number of ownerOfMostUnits)])))) else do (Do nothing)
      • If ((Integer(timeMinutesString[(Player number of ownerOfMostUnits)])) Less than 10) then do (Set timeMinutesString[(Player number of ownerOfMostUnits)] = (0 + (String(timeMinutes[(Player number of ownerOfMostUnits)])))) else do (Do nothing)
      • Multiboard - Set the text for Multiboard item in column 4, row ((Player number of ownerOfMostUnits) + 1) to ((timeMinutesString[(Player number of ownerOfMostUnits)] + <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /> + (timeSecondsString[(Player number of ownerOfMostUnits)] + <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /> + timeMilisecsString[(Player number of ownerOfMostUnits)])))
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Yeah, for multiboards, you really need to see it "in your own eyes" :D
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Well, according to your trigger, it shouldn't add players that aren't playing, and if you test it in single player, only red should be displayed...

But did you test it on b.net with full house ?
 

Eyonix

TH.net Regular
Reaction score
16
No, I tested it on LAN with my brother and he was purple and my multiboard showed me (red) and blue (who wasn't even playing).
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Ok, haven't tested this with more people, but might work :S
 

Eyonix

TH.net Regular
Reaction score
16
Thanks for the effort but I just tested it again on lan and now it only shows red, got any more ideas? ;)
 

2evil

New Member
Reaction score
16
for the first trigger - a caution to doing a loop of 1 - [counted players playing], as many people will change player slots. So wile there is 4 players in the game, some may be in player slot 6 or 7 and be excluded from the loop. You also do this when adding players in the second trigger
 

Eyonix

TH.net Regular
Reaction score
16
I think I get what your saying, because the reason it only shows red and blue when I play with my brother is because he moves to a different slot but joins as blue, could you please point me in a direction to fix it?
 

PrisonLove

Hard Realist
Reaction score
78
My suggestion to you, is to add ALL players to the multiboard so that it always displays every single player, regardless of whether or not they are playing, then change the name of any player whose slot status is = not playing to something like "not playing." That way, you will never exclude anyone who is playing, and there should be no confusion as to who each player is.
 
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