• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Multi Board Problem

Status
Not open for further replies.
Level 9
Joined
Aug 1, 2008
Messages
453
Here are my multi board triggers

  • Multiboard CT
    • Events
    • Conditions
    • Actions
      • Set Player_Count = (Number of players in (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing))))
      • Multiboard - Create a multiboard with 3 columns and (1 + Player_Count) rows, titled Spawn Invasion BETA
      • Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to Player
      • Multiboard - Set the text for (Last created multiboard) item in column 3, row 1 to Points
      • -------- Now set the fields for the first row, AND our player rows. --------
      • For each (Integer A) from 1 to (1 + Player_Count), do (Actions)
        • Loop - Actions
          • Multiboard - Set the display style for (Last created multiboard) item in column 1, row (Integer A) to Show text and Show icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 2, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 3, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the width for (Last created multiboard) item in column 1, row (Integer A) to 2.00% of the total screen width
          • Multiboard - Set the width for (Last created multiboard) item in column 2, row (Integer A) to 12.25% of the total screen width
          • Multiboard - Set the width for (Last created multiboard) item in column 3, row (Integer A) to 2.50% of the total screen width
      • -------- Quickly change the top row to hide that icon.... --------
      • Multiboard - Set the display style for (Last created multiboard) item in column 1, row 1 to Show text and Hide icons
      • -------- DEFINE PLAYERS ON THE BOARD --------
      • -------- List defines the spots on the board, the rows. Starts at second row. --------
      • Set List = 2
      • Player Group - Pick every player in (All players matching ((((Matching player) slot status) Equal to Is playing) and (((Matching player) controller) Equal to User))) and do (Actions)
        • Loop - Actions
          • -------- Mutiboard_Spots keeps track of which row a player has been put on. It is an integer array. --------
          • Set Multiboard_Spots[(Player number of (Picked player))] = List
          • Multiboard - Set the icon for (Last created multiboard) item in column 1, row List to ReplaceableTextures\CommandButtons\BTNOrcBattleStandard.blp
          • Multiboard - Set the text for (Last created multiboard) item in column 2, row List to (Player_Colors[(Player number of (Picked player))] + ((Name of (Picked player)) + |r))
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row List to 0
          • Set List = (List + 1)
      • Multiboard - Show (Last created multiboard)
  • Tally Score CT
    • Events
      • Unit - A unit enters Capture the flag <gen>
    • Conditions
      • ((Owner of (Killing unit)) controller) Equal to User
    • Actions
      • Set Capture_Flag_Count[(Player number of (Owner of (Triggering unit)))] = (Capture_Flag_Count[(Player number of (Owner of (Triggering unit)))] + 1)
      • Multiboard - Set the text for (Last created multiboard) item in column 3, row Multiboard_Spots[(Player number of (Owner of (Killing unit)))] to (String(Kill_Count[(Player number of (Owner of (Killing unit)))]))
      • Leaderboard - Sort (Last created leaderboard) by Value in Descending order
Here's what it first looks like before it tally's any score
View attachment Before.psd

Here's what it looked like after it tally's score
View attachment After.psd

What did i do wrong? i want the 1 on the top row on the after file to say points after it tallys score
PS how do i attach thumbnails?
 
Level 17
Joined
Jun 12, 2007
Messages
1,261
Hmm? You use variables all over that thing, just make a multiboard variable.
And set (last created multiboard) = MyMultiboard (Is variable.) Right after you create it.

That means after this action:
  • Multiboard - Create a multiboard with 3 columns and (1 + Player_Count) rows, titled Spawn Invasion BETA
Then just replace every single (last created multiboard) into MyMultiboard.

Also I noticed this:

  • Events
  • Unit - A unit enters Capture the flag <gen>
  • Conditions
  • ((Owner of (Killing unit)) controller) Equal to User
The condition is a big load of crap. xD
Replace it with Owner of (Entering unit) controller.

BTW, I think it would work for both teams... xD

EDIT: And where is your event for the first trigger hmm? I actualy wonder if you made this yourself.. xD
 
Level 9
Joined
Aug 1, 2008
Messages
453
it is doing the same thing before here are the new triggers
  • Multiboard CT
    • Events
    • Conditions
    • Actions
      • Set Player_Count = (Number of players in (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing))))
      • Multiboard - Create a multiboard with 3 columns and (1 + Player_Count) rows, titled Spawn Invasion BETA
      • Set Multi_Board = (Last created multiboard)
      • Multiboard - Set the text for Multi_Board item in column 2, row 1 to Player
      • Multiboard - Set the text for Multi_Board item in column 3, row 1 to Points
      • -------- Now set the fields for the first row, AND our player rows. --------
      • For each (Integer A) from 1 to (1 + Player_Count), do (Actions)
        • Loop - Actions
          • Multiboard - Set the display style for Multi_Board item in column 1, row (Integer A) to Show text and Show icons
          • Multiboard - Set the display style for Multi_Board item in column 2, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the display style for Multi_Board item in column 3, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the width for Multi_Board item in column 1, row (Integer A) to 2.00% of the total screen width
          • Multiboard - Set the width for Multi_Board item in column 2, row (Integer A) to 12.25% of the total screen width
          • Multiboard - Set the width for Multi_Board item in column 3, row (Integer A) to 2.50% of the total screen width
      • -------- Quickly change the top row to hide that icon.... --------
      • Multiboard - Set the display style for Multi_Board item in column 1, row 1 to Show text and Hide icons
      • -------- DEFINE PLAYERS ON THE BOARD --------
      • -------- List defines the spots on the board, the rows. Starts at second row. --------
      • Set List = 2
      • Player Group - Pick every player in (All players matching ((((Matching player) slot status) Equal to Is playing) and (((Matching player) controller) Equal to User))) and do (Actions)
        • Loop - Actions
          • -------- Mutiboard_Spots keeps track of which row a player has been put on. It is an integer array. --------
          • Set Multiboard_Spots[(Player number of (Picked player))] = List
          • Multiboard - Set the icon for Multi_Board item in column 1, row List to ReplaceableTextures\CommandButtons\BTNOrcBattleStandard.blp
          • Multiboard - Set the text for Multi_Board item in column 2, row List to (Player_Colors[(Player number of (Picked player))] + ((Name of (Picked player)) + |r))
          • Multiboard - Set the text for Multi_Board item in column 3, row List to 0
          • Set List = (List + 1)
      • Multiboard - Show Multi_Board
  • Events
  • Tally Score CT
    • Events
      • Unit - A unit enters Capture the flag <gen>
    • Conditions
      • ((Owner of (Entering unit)) controller) Equal to User
    • Actions
      • Set Capture_Flag_Count[(Player number of (Owner of (Triggering unit)))] = (Capture_Flag_Count[(Player number of (Owner of (Triggering unit)))] + 1)
      • Multiboard - Set the text for Multi_Board item in column 3, row Multiboard_Spots[(Player number of (Owner of (Killing unit)))] to (String(Kill_Count[(Player number of (Owner of (Killing unit)))]))
      • Leaderboard - Sort (Last created leaderboard) by Value in Descending order
 
Level 9
Joined
Aug 1, 2008
Messages
453
i don't know if it would be easier but do you think you could make me a multi board like this


Spawn Invasion BETA

West Team-----------Score
Player1
player2
player3
player4
East Team------------Score
player5
player6
player7
player8


KEY
- = Space
i would give credits please and thank you
 
Level 4
Joined
Nov 23, 2007
Messages
113
I don't use triggers anymore (as jass is much easier to read) but from what you have there it seems you are incorrectly indexing the Multiboard_spots array.

Your trigger event is based on Entering Unit yet when you index the array you use for the multiboard rows (where the players are), you use Owner of Killing Unit (which of course, there isn't a killing unit but rather, an Entering Unit). Thus Killing Unit will have an undefined value and therefore not the index into the array you expected.
 
Level 17
Joined
Jun 12, 2007
Messages
1,261
I don't use triggers anymore (as jass is much easier to read) but from what you have there it seems you are incorrectly indexing the Multiboard_spots array.

Your trigger event is based on Entering Unit yet when you index the array you use for the multiboard rows (where the players are), you use Owner of Killing Unit (which of course, there isn't a killing unit but rather, an Entering Unit). Thus Killing Unit will have an undefined value and therefore not the index into the array you expected.

That's what you think, once people know jass they go like, lol gui sucks jass is way more easy.
But think about this, what if you can't read it huh?

So please stop talking like that.
Sure jass is better, but gui is way more easy to read if u have 0 experience wit stuf like that. SOme people can never use it so there.
 
Level 4
Joined
Nov 23, 2007
Messages
113
That's what you think, once people know jass they go like, lol gui sucks jass is way more easy.
But think about this, what if you can't read it huh?

So please stop talking like that.
Sure jass is better, but gui is way more easy to read if u have 0 experience wit stuf like that. SOme people can never use it so there.

You're joking, right? Or did you actually misinterpret my statements so completely? (for the contextually challenged, that was rhetorical)

I never said GUI sucks. I said jass is easier (for me) to read (notice the context of the first sentence which refers to "me" as opposed to "easier to read" as a general statement). In other words, it doesn't imply jass is easier for YOU to read, but for me.

I find looking at the GUI a confusing mess. If you prefer the GUI, that's fine. Whatever floats your boat. I just happen to prefer reading code since that is what I am used to.

And the point I was trying to make with the first sentence is... that since I don't use the GUI much anymore, I may be mistaken in the assessment I was about to make in reference to what errors he may or may not be encountering (since of course, I may not be as familiar with it as others contributing to the thread).

"So please stop talking like that."
If you didn't take my statements so completely out of context, you wouldn't have been offended by them nor find any need to be so defensive. Sorry if you are experiencing some sort of inferiority complex, but please don't use my post out of context to express it.

Edit: And just as a side note, you give the OP a condescending attitude telling him part of his code is a load of crap, yet you're the first to complain when you "think" someone has patronized you. :/
 
Last edited:
Level 17
Joined
Jun 12, 2007
Messages
1,261
You're joking, right? Or did you actually misinterpret my statements so completely? (for the contextually challenged, that was rhetorical)

I never said GUI sucks. I said jass is easier (for me) to read (notice the context of the first sentence which refers to "me" as opposed to "easier to read" as a general statement). In other words, it doesn't imply jass is easier for YOU to read, but for me.

I find looking at the GUI a confusing mess. If you prefer the GUI, that's fine. Whatever floats your boat. I just happen to prefer reading code since that is what I am used to.

And the point I was trying to make with the first sentence is... that since I don't use the GUI much anymore, I may be mistaken in the assessment I was about to make in reference to what errors he may or may not be encountering (since of course, I may not be as familiar with it as others contributing to the thread).

"So please stop talking like that."
If you didn't take my statements so completely out of context, you wouldn't have been offended by them nor find any need to be so defensive. Sorry if you are experiencing some sort of inferiority complex, but please don't use my post out of context to express it.

Edit: And just as a side note, you give the OP a condescending attitude telling him part of his code is a load of crap, yet you're the first to complain when you "think" someone has patronized you. :/

Lol, I think he is mad.

Oke, I have made a multiboard before, it's pretty old but it works so just take a look at that.

  • Multiboard Create
    • Events
      • Unit - A unit Finishes an upgrade
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to |c00106246Respawns (0)
          • (Unit-type of (Triggering unit)) Equal to |c00106246Respawns (1)
          • (Unit-type of (Triggering unit)) Equal to |c00106246Respawns (2)
          • (Unit-type of (Triggering unit)) Equal to |c00106246Respawns (3)
          • (Unit-type of (Triggering unit)) Equal to |c00106246Respawns (Unlimited)
    • Actions
      • Unit - Remove (Triggering unit) from the game
      • Cinematic - Hide filter
      • Cinematic - Enable user control for (All players)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MainMode[1] Equal to True
        • Then - Actions
          • Multiboard - Create a multiboard with 5 columns and 12 rows, titled Game Stats [Surviva...
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • MainMode[2] Equal to True
            • Then - Actions
              • Multiboard - Create a multiboard with 5 columns and 12 rows, titled Game Stats [Arcane ...
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • MainMode[3] Equal to True
                • Then - Actions
                  • Multiboard - Create a multiboard with 5 columns and 12 rows, titled Game Stats [Necroma...
                • Else - Actions
      • Set GameStats = (Last created multiboard)
      • Multiboard - Hide GameStats
      • Multiboard - Set the width for GameStats item in column 1, row 0 to 10.00% of the total screen width
      • Multiboard - Set the width for GameStats item in column 2, row 0 to 5.00% of the total screen width
      • Multiboard - Set the width for GameStats item in column 3, row 0 to 8.00% of the total screen width
      • Multiboard - Set the width for GameStats item in column 4, row 0 to 4.00% of the total screen width
      • Multiboard - Set the width for GameStats item in column 5, row 0 to 6.00% of the total screen width
      • Multiboard - Set the text for GameStats item in column 1, row 1 to Player:
      • Multiboard - Set the text for GameStats item in column 2, row 1 to Status:
      • Multiboard - Set the text for GameStats item in column 3, row 1 to Class:
      • Multiboard - Set the text for GameStats item in column 4, row 1 to Kills:
      • Multiboard - Set the text for GameStats item in column 5, row 1 to Respawns:
      • Multiboard - Set the text for GameStats item in column 1, row 11 to |cffFF0202Ziggurats...
      • Multiboard - Set the text for GameStats item in column 2, row 11 to (|cffFF0202 + (String(ZigguratsAlive)))
      • Multiboard - Set the text for GameStats item in column 1, row 12 to |cffFF0202Zombies A...
      • Multiboard - Set the text for GameStats item in column 2, row 12 to (|cffFF0202 + (String(ZombiesAlive)))
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Player((Integer A))) slot status) Equal to Is playing
            • Then - Actions
              • Multiboard - Set the text for GameStats item in column 1, row ((Integer A) + 1) to (PlayerColor[(Integer A)] + (Name of (Player((Integer A)))))
              • Multiboard - Set the text for GameStats item in column 2, row ((Integer A) + 1) to (PlayerColor[7] + Alive)
              • Multiboard - Set the text for GameStats item in column 4, row ((Integer A) + 1) to (String(PlayerKills[(Player number of (Player((Integer A))))]))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • PlayerRessurectsUnlimited Equal to False
                • Then - Actions
                  • Multiboard - Set the text for GameStats item in column 5, row ((Integer A) + 1) to (String(PlayerRessurects[(Player number of (Player((Integer A))))]))
                • Else - Actions
                  • Multiboard - Set the text for GameStats item in column 5, row (Player number of (Player((Integer A)))) to Unlimited
            • Else - Actions
              • Multiboard - Set the text for GameStats item in column 1, row ((Integer A) + 1) to |cff949596N/A
      • Multiboard - Set the display style for GameStats item in column 0, row 0 to Show text and Hide icons
      • Wait 1.00 seconds
      • Multiboard - Show GameStats
      • Trigger - Turn on ChangeName <gen>
      • Trigger - Turn on RedKicks <gen>
Just ignore the parts that you don't need like the conditions.
 
Status
Not open for further replies.
Top