Adding kill counts to multiboard

neetmaster

New Member
Reaction score
0
I have this multiboard and I'm also having problem setting it.
Trigger:
  • Multiboard Kills Setup
    • Events
      • Time - Elapsed game time is 2.00 seconds
    • Conditions
    • Actions
      • Multiboard - Create a multiboard with 2 columns and (Number of players in PlayingPlayers) rows, titled Units Killed
      • Set multiboard_UnitsKilled = (Last created multiboard)
        • Do Multiple ActionsFor each (Integer A) from 1 to (Number of players in PlayingPlayers), do (Actions)
          • Loop - Actions
            • Multiboard - Set the display style for multiboard_UnitsKilled item in column 1, row (Integer A) to Show text and Hide icons
            • Multiboard - Set the display style for multiboard_UnitsKilled item in column 2, row (Integer A) to Show text and Hide icons
            • Player Group - Pick every player in PlayingPlayers and do (Actions)
              • Loop - Actions
                • Multiboard - Set the text for multiboard_UnitsKilled item in column 1, row (Integer A) to ((Name of (Picked player)) + <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" />
            • Multiboard - Set the text for multiboard_UnitsKilled item in column 2, row (Integer A) to 0
            • Multiboard - Set the width for multiboard_UnitsKilled item in column 1, row (Integer A) to 15.00% of the total screen width
      • Multiboard - Show multiboard_UnitsKilled
      • Multiboard - Maximize multiboard_UnitsKilled


Only if a player is playing, it makes a row for him.
So if there's 3 players playing from the start there will be 2 rows.


What i want is :
If a player kills a unit, it adds to the column2 and the row in which the player is at.
The problem is how do i point which row should the data go in?
 

JeveKnight

New Member
Reaction score
2
I believe you would have to make a variable called PlayerRow or something and make it an Integer Array (12)
You would also have to make a variable KillCount, and make it an Integer Array (12) as well.

Trigger:
  • Unit - A unit Dies
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Dying unit)) is an enemy of (Owner of (Killing unit))) Equal to (==) True
        • Then - Actions
          • Set KillCount[(Player number of (Owner of (Killing unit)))] = (KillCount[(Player number of (Owner of (Killing unit)))] + 1)
          • Multiboard - Set the text for (Last created multiboard) item in column 2, row PlayerRow[(Player number of (Owner of (Killing unit)))] to (String(KillCount[(Player number of (Owner of (Killing unit)))]))


That should work.
 

neetmaster

New Member
Reaction score
0
I believe you would have to make a variable called PlayerRow or something and make it an Integer Array (12)
You would also have to make a variable KillCount, and make it an Integer Array (12) as well.

Trigger:
  • Unit - A unit Dies
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Dying unit)) is an enemy of (Owner of (Killing unit))) Equal to (==) True
        • Then - Actions
          • Set KillCount[(Player number of (Owner of (Killing unit)))] = (KillCount[(Player number of (Owner of (Killing unit)))] + 1)
          • Multiboard - Set the text for (Last created multiboard) item in column 2, row PlayerRow[(Player number of (Owner of (Killing unit)))] to (String(KillCount[(Player number of (Owner of (Killing unit)))]))


That should work.

What if the player number is say, 5 but he's in the row 2 or something?
 

JeveKnight

New Member
Reaction score
2
The trigger should still work, even if player 5 is in row 2.
I tested it in-game and it worked properly for me.
If you notice any problems, tell me.

Also, if you want set colors for each person on the multiboard this will work fine:

Trigger:
  • Colors
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Color[1] = |cffff0000
      • Set Color[2] = |cff0000ff
      • Set Color[3] = |cff00ffff
      • Set Color[4] = |cff660099
      • Set Color[5] = |cffffff00
      • Set Color[6] = |cffff9933
      • Set Color[7] = |cff00ff00
      • Set Color[8] = |cffff00ff
      • Set Color[9] = |cffcccccc
      • Set Color[10] = |cff99ccff
      • Set Color[11] = |cff336600
      • Set Color[12] = |cff663333


Color is a String Array variable (12)

Then, for the multiboard creation you would have to do something like this:


Trigger:
  • Create Multi
    • Events
      • Time - Elapsed game time is 0.10 seconds
    • Conditions
    • Actions
      • Multiboard - Create a multiboard with 2 columns and 1 rows, titled Player Stats
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Player name
      • Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to Kills
      • Player Group - Pick every player in ThePlayers and do (Actions)
        • Loop - Actions
          • Multiboard - Change the number of rows for (Last created multiboard) to ((Number of rows in (Last created multiboard)) + 1)
          • Set PlayerRow[(Player number of (Picked player))] = (Number of rows in (Last created multiboard))
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row PlayerRow[(Player number of (Picked player))] to ((Color[(Player number of (Picked player))] + (Name of (Picked player))) + |r)
          • Multiboard - Set the text for (Last created multiboard) item in column 2, row PlayerRow[(Player number of (Picked player))] to 0
            • Do Multiple ActionsFor each (Integer A) from 1 to ((Number of players in ThePlayers) + 1), do (Actions)
              • Loop - Actions
                • Multiboard - Set the width for (Last created multiboard) item in column 1, row (Integer A) to 12.00% of the total screen width
                • Multiboard - Set the width for (Last created multiboard) item in column 2, row (Integer A) to 4.00% of the total screen width
      • Multiboard - Maximize (Last created multiboard)


There is a variable called ThePlayers and you would initialize it like this:

Trigger:
  • PlayerGroup
    • Events
      • Time - Elapsed game time is 0.03 seconds
    • Conditions
    • Actions
      • If ((Player 1 (Red) slot status) Equal to (==) Is playing) then do (Player Group - Add Player 1 (Red) to ThePlayers) else do (Do nothing)
      • If ((Player 2 (Blue) slot status) Equal to (==) Is playing) then do (Player Group - Add Player 2 (Blue) to ThePlayers) else do (Do nothing)
      • If ((Player 3 (Teal) slot status) Equal to (==) Is playing) then do (Player Group - Add Player 3 (Teal) to ThePlayers) else do (Do nothing)
      • If ((Player 4 (Purple) slot status) Equal to (==) Is playing) then do (Player Group - Add Player 4 (Purple) to ThePlayers) else do (Do nothing)
      • If ((Player 5 (Yellow) slot status) Equal to (==) Is playing) then do (Player Group - Add Player 5 (Yellow) to ThePlayers) else do (Do nothing)
      • If ((Player 6 (Orange) slot status) Equal to (==) Is playing) then do (Player Group - Add Player 6 (Orange) to ThePlayers) else do (Do nothing)
      • If ((Player 7 (Green) slot status) Equal to (==) Is playing) then do (Player Group - Add Player 7 (Green) to ThePlayers) else do (Do nothing)
      • If ((Player 8 (Pink) slot status) Equal to (==) Is playing) then do (Player Group - Add Player 8 (Pink) to ThePlayers) else do (Do nothing)
      • If ((Player 9 (Gray) slot status) Equal to (==) Is playing) then do (Player Group - Add Player 9 (Gray) to ThePlayers) else do (Do nothing)
      • If ((Player 10 (Light Blue) slot status) Equal to (==) Is playing) then do (Player Group - Add Player 10 (Light Blue) to ThePlayers) else do (Do nothing)
      • If ((Player 11 (Dark Green) slot status) Equal to (==) Is playing) then do (Player Group - Add Player 11 (Dark Green) to ThePlayers) else do (Do nothing)
      • If ((Player 12 (Brown) slot status) Equal to (==) Is playing) then do (Player Group - Add Player 12 (Brown) to ThePlayers) else do (Do nothing)


ThePlayers is a player group variable.
 
General chit-chat
Help Users
  • 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
    +1
  • V-SNES V-SNES:
    Happy Friday!
    +1

      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