• 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] MB Help

Status
Not open for further replies.
Level 9
Joined
Jun 7, 2008
Messages
440
I have (finally) figured out how to set non order units to the Multi-Board using a string Variable. This is what I have:
  • Multiboard Setup
    • Events
    • Conditions
    • Actions
      • Set Multiboard_Players[1] = |cff7EBFF1Light Side|r
      • Set Multiboard_Players[2] = Player_Color[(Player number of Player 1 (Red))]
      • Set Multiboard_Players[3] = Player_Color[(Player number of Player 2 (Blue))]
      • Set Multiboard_Players[4] = Player_Color[(Player number of Player 5 (Yellow))]
      • Set Multiboard_Players[5] = Player_Color[(Player number of Player 8 (Pink))]
      • Set Multiboard_Players[6] = Player_Color[(Player number of Player 9 (Gray))]
      • Set Multiboard_Players[7] = |cff4E2A04Dark Side|r
      • Set Multiboard_Players[8] = Player_Color[(Player number of Player 3 (Teal))]
      • Set Multiboard_Players[9] = Player_Color[(Player number of Player 4 (Purple))]
      • Set Multiboard_Players[10] = Player_Color[(Player number of Player 6 (Orange))]
      • Set Multiboard_Players[11] = Player_Color[(Player number of Player 7 (Green))]
      • Set Multiboard_Players[12] = Player_Color[(Player number of Player 11 (Dark Green))]
My problem is, how do I call these players in this order, should one of their units die?

  • Events
    • Unit - A unit dies
  • Conditions
  • Actions
    • Set Kills[Player number of (Owner of (triggering unit))] = Kills[Player number of (Owner of (triggering unit))] + 1
    • Multiboard - Set the text for (MultiboardOne) item in column 2, row (STUCK HERE) to Kills[Player number of (Owner of (triggering unit))]
Can Anyone help me out?
 
Level 3
Joined
Jan 9, 2010
Messages
34
First of all you should put the players in their normal order, otherwise you will need a lot of triggers to get the multiboard to show them in the correct order iirc.

  • Events
    • Unit - A unit dies
  • Conditions
  • Actions
    • Set Kills[Player number of (Owner of (triggering unit))] = Kills[Player number of (Owner of (triggering unit))] + 1
    • Multiboard - Set the text for (MultiboardOne) item in column 2, row (STUCK HERE) to Kills[Player number of (Owner of (triggering unit))]


You should set the text to
  • Multiboard - Set the text for (MultiboardOne) item in column 2, row (Multiboard_players[Player number of (Owner of Killing Unit) to Kills +1
In the last sentence, the number 1 should be replaced accordingly. I just made a multiboard for my own map, and I for example have a category index for each variable (like a heading for each stat).
Meaning the heading is in the row 1 and player 1 is on row 2 (So +1 to not make it replace the category index and set the values properly).
 
Level 9
Joined
Jun 7, 2008
Messages
440
First of all you should put the players in their normal order, otherwise you will need a lot of triggers to get the multiboard to show them in the correct order iirc.

Thanks for that. For team reasons, I don't want them in numerical reason on the multiboard. I want them line after line in their own respective teams.




You should set the text to
  • Multiboard - Set the text for (MultiboardOne) item in column 2, row (Multiboard_players[Player number of (Owner of Killing Unit) to Kills +1
In the last sentence, the number 1 should be replaced accordingly. I just made a multiboard for my own map, and I for example have a category index for each variable (like a heading for each stat).
Meaning the heading is in the row 1 and player 1 is on row 2 (So +1 to not make it replace the category index and set the values properly).

Ya, I am aware of how to do it this way. I was asking if there was a way to do it the way I wanted. I was thinking of setting an integer set for each player ( to escape the numerical order), but I failed when trying to call the player. It set all players kill count to +1. (I think the player number returned 0 hence the reasoning there) but I don't know. Thanks for the explanation though.

Any other ideas?
 
The only way to do this is:
  • Tr
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Set Rows[1] = 2
    • Set Rows[2] = 3
    • Set Rows[3] = 8
    • Set Rows[4] = 9
    • Set Rows[5] = 4
    • Set Rows[6] = 10
    • Set Rows[7] = 11
    • Set Rows[8] = 5
    • Set Rows[9] = 6
    • Set Rows[11] = 12
  • Tr2
  • Events
    • Unit - A unit dies
  • Conditions
    • ((Triggering unit) belongs to an enemy of (Owner of (Killing unit))) Equal to True
  • Actions
    • Set Kills[Player number of (Owner of (Killing unit))] = Kills[Player number of (Owner of (Killing unit))] + 1)
    • Multiboard - Set the text for (MultiboardOne) item in column 2, row Rows[Player Number of (Owner of (Killing unit))] to Kills[Player number of (Owner of (Killing unit))]
Rows[] is an Integer variable. Basically, the arrays contain the players' numbers, when their equations contain the rows they belong to.
 
Level 9
Joined
Jun 7, 2008
Messages
440
I thought of that as well, though as i was working on it, i came to realise a problem, When you call "player number of triggering unit" it returns the players number, not the integer you have set at it. :sad: Any other ideas?
 
Level 9
Joined
Jun 7, 2008
Messages
440
Use an index conversion array. Basically an array which takes the player slot number and returns what multiboard index it is.

Could you please elaborate? Im not sure I understand.

PurgeandFire111 said:
Aren't you using it as an index for the array? []

I am not quite sure what you mean, What I tried doing was the same as what was typed out by Pharoah_:

Pharaoh_ The only way to do this is:

  • Tr
  • Events
  • Map Initialization
  • Conditions
  • Actions
  • Set Rows[1] = 2
  • Set Rows[2] = 3
  • Set Rows[3] = 8
  • Set Rows[4] = 9
  • Set Rows[5] = 4
  • Set Rows[6] = 10
  • Set Rows[7] = 11
  • Set Rows[8] = 5
  • Set Rows[9] = 6
  • Set Rows[11] = 12
  • Tr2
  • Events
  • Unit - A unit dies
  • Conditions
  • ((Triggering unit) belongs to an enemy of (Owner of (Killing unit))) Equal to True
  • Actions
  • Set Kills[Player number of (Owner of (Killing unit))] = Kills[Player number of (Owner of (Killing unit))] + 1)
  • Multiboard - Set the text for (MultiboardOne) item in column 2, row Rows[Player Number of (Owner of (Killing unit))] to Kills[Player number of (Owner of (Killing unit))]

But when doing this, it returns the player number, for instance: Red would return 1 not the actual row that the player is in. And I was not sure how to get around it, hence the reason why I am stuck in the first place.
 
I am not quite sure what you mean, What I tried doing was the same as what was typed out by Pharoah_:



But when doing this, it returns the player number, for instance: Red would return 1 not the actual row that the player is in. And I was not sure how to get around it, hence the reason why I am stuck in the first place.
Let's say our player is Player 1 (Red). Number of Player 1 (Red) is 1. So, Rows[Player Number of (Owner of (Killing unit))] = Rows[1] = 2 (according to the variables we've set in the Initialization trigger). I don't get why do you think it would return 1.
 
Status
Not open for further replies.
Top