[Multiboard] Could anyone check out what's wrong with this one?

Status
Not open for further replies.
If you would like an additional eye helping you with this, you could write the triggers here in the thread bcoz I don't have the WE where I am. Otherwise i'm sure someone else will fix it for you shortly :)
 
This is all what I got.

  • Color de los jugadores
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Colores_Jugador[1] = |c00ff0000
      • Set Colores_Jugador[2] = |c000000ff
      • Set Colores_Jugador[3] = |c0000ffff
      • Set Colores_Jugador[4] = |cff551A8B
      • Set Colores_Jugador[5] = |cffffff00
      • Set Colores_Jugador[6] = |cffff4000
      • Set Colores_Jugador[7] = |cff00EE00
      • Set Colores_Jugador[8] = |cffFF34B3
      • Set Colores_Jugador[9] = |cffBEBEBE
      • Set Colores_Jugador[10] = |cff00BFFF
      • Set Colores_Jugador[11] = |cff008B45
      • Set Colores_Jugador[12] = |cff8B4726
  • Simple Multiboard
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Set Contador_Jugador = (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 + Contador_Jugador) rows, titled ¡12 Súper Enanos!
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Jugador
      • Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to Kills
      • Multiboard - Set the text for (Last created multiboard) item in column 3, row 1 to Deaths
      • For each (Integer A) from 1 to (1 + Contador_Jugador), do (Actions)
        • Loop - Actions
          • -------- Vista --------
          • Multiboard - Set the display style for (Last created multiboard) item in column 1, row (Integer A) to Show text and Hide 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
          • -------- Ancho --------
          • 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 - Set the width for (Last created multiboard) item in column 3, row (Integer A) to 4.00% of the total screen width
      • Set Lista = 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
          • Set Multiboard_Sports[(Player number of (Picked player))] = Lista
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row Lista to (Colores_Jugador[(Player number of (Picked player))] + ((Name of (Picked player)) + |r))
          • Multiboard - Set the text for (Last created multiboard) item in column 2, row Lista to 0
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row Lista to 0
          • Set Lista = (Lista + 1)
      • Multiboard - Show (Last created multiboard)
  • Cuenta Kills
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) is A Hero) Equal to True
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • Set Cuenta_Kills[(Player number of (Owner of (Killing unit)))] = (Cuenta_Kills[(Player number of (Owner of (Killing unit)))] + 1)
          • Multiboard - Set the text for (Last created multiboard) item in column 2, row Multiboard_Sports[(Player number of (Owner of (Killing unit)))] to (String(Cuenta_Kills[(Player number of (Owner of (Killing unit)))]))
        • Else - Actions
          • Do nothing
  • Cuenta Deaths
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) is A Hero) Equal to True
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • Set Cuenta_Deaths[(Player number of (Owner of (Dying unit)))] = (Cuenta_Deaths[(Player number of (Owner of (Dying unit)))] + 1)
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row Multiboard_Sports[(Player number of (Owner of (Dying unit)))] to (String(Cuenta_Deaths[(Player number of (Owner of (Dying unit)))]))
        • Else - Actions
          • Do nothing
What happens is that when I kill a hero, it add one digit to all scores and to the place where's the text "death". Check out the attached image.
 

Attachments

  • 1111111111.jpg
    1111111111.jpg
    31.2 KB · Views: 126
What is lista?

  • Multiboard - Set the text for (Last created multiboard) item in column 3, row Multiboard_Sports[(Player number of (Owner of (Dying unit)))] to (String(Cuenta_Deaths[(Player number of (Owner of (Dying unit)))]))
  • Set Multiboard_Sports[(Player number of (Picked player))] = Lista
take a good look at those 2.. tell me if it seems normal.. (No idea what lista is.. sry)
 
I am going to make a guess that this only happens when you kill an unused/computer player hero. If the answer is no, then ignore the following paragraph.

It's because Multiboard_Sports is, by default, set to 0 for that player number since it's not set in the
  • 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)
And since it's equal to 0, all rows will get affected.
Either remove the unused heroes to avoid this problem or trigger it so that the multiboard will only be updated if the player is a user and is currently playing.

Anyway, your trigger is inefficient. The Hero Death trigger can be simplified to this:
  • Cuenta Kills
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) is A Hero) Equal to True
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set Cuenta_Kills[(Player number of (Owner of (Killing unit)))] = (Cuenta_Kills[(Player number of (Owner of (Killing unit)))] + 1)
      • Multiboard - Set the text for Scoreboard item in column 2, row Multiboard_Sports[(Player number of (Owner of (Killing unit)))] to (String(Cuenta_Kills[(Player number of (Owner of (Killing unit)))]))
      • Set Cuenta_Deaths[(Player number of (Owner of (Triggering unit)))] = (Cuenta_Deaths[(Player number of (Owner of (Triggering unit)))] + 1)
      • Multiboard - Set the text for Scoreboard item in column 3, row Multiboard_Sports[(Player number of (Triggering player))] to (String(Cuenta_Deaths[(Player number of (Triggering player))]))
Note: I used Triggering unit instead of Dying unit since it refers to the same thing and is a bit faster/can work in local code. Triggering player is the same as the owning player of the Triggering unit except it's also a bit faster.
Don't use Do Nothing.

You also should have used a variable to refer to Last created multiboard.
 
Status
Not open for further replies.
Back
Top