Multiboard DeathCount Help!

Crazy-Host

New Member
Reaction score
0
Im having trouble working with a multiboard that counts kills and deaths
Problem: The multiboard wont count the deaths by the hero.

Heres the triggers -
The First Trigger
Multiboard Settings
Events
Time - Elapsed game time is 20.00 seconds
Conditions
Actions
Set ShownIcon = ReplaceableTextures\CommandButtons\BTNVillagerMan.blp
Multiboard - Create a multiboard with 4 columns and 8 rows, titled |cff43C6DBTropical ...
Set Multiboard = (Last created multiboard)
Multiboard - Set the width for Multiboard item in column 0, row 0 to 7.00% of the total screen width
Multiboard - Set the width for Multiboard item in column 1, row 0 to 10.00% of the total screen width
Multiboard - Set the icon for Multiboard item in column 1, row 0 to ShownIcon
Multiboard - Maximize Multiboard
-------- Removing icons for the lines (2-5) --------
For each (Integer Integer) from 2 to 5, do (Actions)
Loop - Actions
Multiboard - Set the display style for Multiboard item in column Integer, row 0 to Show text and Hide icons
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 PlayerUnit[(Player number of (Owner of (Picked unit)))] = (Picked unit)
Set GS_Kills[(Player number of (Owner of (Picked unit)))] = 0
Multiboard - Set the text for Multiboard item in column 1, row (Player number of (Owner of (Picked unit))) to PlayerNames[(Player number of (Owner of (Picked unit)))]
Multiboard - Set the text for Multiboard item in column 2, row (Player number of (Owner of (Picked unit))) to ((String(GS_Kills[(Player number of (Owner of (Picked unit)))])) + Hero Kills(s))
Multiboard - Set the color for Multiboard item in column 2, row (Player number of (Owner of (Picked unit))) to (100.00%, 40.00%, 40.00%) with 0.00% transparency
Multiboard - Set the text for Multiboard item in column 4, row (Player number of (Owner of (Picked unit))) to ((String(Deaths[(Player number of (Owner of (Picked unit)))])) + Death(s))
Multiboard - Set the color for Multiboard item in column 4, row (Player number of (Owner of (Picked unit))) to (100.00%, 40.00%, 40.00%) with 0.00% transparency

The death counting trigger
Death Count - Multiboard
Events
Unit - A unit Dies
Conditions
((Dying unit) is A Hero) Equal to True
(Owner of (Killing unit)) Not equal to (Owner of (Dying unit))
Actions
Set Deaths[(Player number of (Owner of (Dying unit)))] = Deaths[((Player number of (Owner of (Dying unit))) + 2)]
Multiboard - Set the text for Multiboard item in column 4, row (Player number of (Owner of (Dying unit))) to ((String(Deaths[(Player number of (Owner of (Dying unit)))])) + Death(s))


Can someone explain to me what the problem is?!
 

Smilis

TH.net Regular
Reaction score
7
Im having trouble working with a multiboard that counts kills and deaths
Problem: The multiboard wont count the deaths by the hero.

Heres the triggers -
The First Trigger
Multiboard Settings
Events
Time - Elapsed game time is 20.00 seconds
Conditions
Actions
Set ShownIcon = ReplaceableTextures\CommandButtons\BTNVillagerMan.blp
Multiboard - Create a multiboard with 4 columns and 8 rows, titled |cff43C6DBTropical ...
Set Multiboard = (Last created multiboard)
Multiboard - Set the width for Multiboard item in column 0, row 0 to 7.00% of the total screen width
Multiboard - Set the width for Multiboard item in column 1, row 0 to 10.00% of the total screen width
Multiboard - Set the icon for Multiboard item in column 1, row 0 to ShownIcon
Multiboard - Maximize Multiboard
-------- Removing icons for the lines (2-5) --------
For each (Integer Integer) from 2 to 5, do (Actions)
Loop - Actions
Multiboard - Set the display style for Multiboard item in column Integer, row 0 to Show text and Hide icons
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 PlayerUnit[(Player number of (Owner of (Picked unit)))] = (Picked unit)
Set GS_Kills[(Player number of (Owner of (Picked unit)))] = 0
Multiboard - Set the text for Multiboard item in column 1, row (Player number of (Owner of (Picked unit))) to PlayerNames[(Player number of (Owner of (Picked unit)))]
Multiboard - Set the text for Multiboard item in column 2, row (Player number of (Owner of (Picked unit))) to ((String(GS_Kills[(Player number of (Owner of (Picked unit)))])) + Hero Kills(s))
Multiboard - Set the color for Multiboard item in column 2, row (Player number of (Owner of (Picked unit))) to (100.00%, 40.00%, 40.00%) with 0.00% transparency
Multiboard - Set the text for Multiboard item in column 4, row (Player number of (Owner of (Picked unit))) to ((String(Deaths[(Player number of (Owner of (Picked unit)))])) + Death(s))
Multiboard - Set the color for Multiboard item in column 4, row (Player number of (Owner of (Picked unit))) to (100.00%, 40.00%, 40.00%) with 0.00% transparency

The death counting trigger
Death Count - Multiboard
Events
Unit - A unit Dies
Conditions
((Dying unit) is A Hero) Equal to True
(Owner of (Killing unit)) Not equal to (Owner of (Dying unit))
Actions
Set Deaths[(Player number of (Owner of (Dying unit)))] = Deaths[((Player number of (Owner of (Dying unit))) + 2)]
Multiboard - Set the text for Multiboard item in column 4, row (Player number of (Owner of (Dying unit))) to ((String(Deaths[(Player number of (Owner of (Dying unit)))])) + Death(s))


Can someone explain to me what the problem is?!


Try to set the code:
Trigger:
  • * Or - Any (Conditions) are true
    • o Conditions


in the conditions, and then put the other conditons into the "new" conditions ;P

EDIT: Do you really want it to add two deaths and not only one? :)
 

Crazy-Host

New Member
Reaction score
0
I tried that :/
It didnt work.
Im pretty sure something is wrong with the variable settings or the multiboard count =0.
Thx for the help anyways
 

Smilis

TH.net Regular
Reaction score
7
Is the problem that the count wont show up in the beginging or through the whole game?

I noteced you hade used Picked Unit, I belive it should be "Integer A" (or what ever you have had) inside the loop :)

And I now know why you had Picked Unit... Please use the "Trigger" - code so that the trigger is easier to read :)


EDIT:

It works perfect for me...
Try to change:
Time - Elapsed game time is 20.00 seconds
to
Time - Elapsed game time is 0.10 seconds

and then try to kill a hero again... Does it work than?
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
Similis:
>>It works perfect for me...
What does? His trigger? No, it doesnt...

Crazy-host:
>>Im pretty sure something is wrong with the variable settings or the multiboard count =0.
Not sure which variable "settings" you are refering to here... :)

Well, ... ehm, here:
Code:
Untitled Trigger 001
    Events
        Time - Elapsed game time is 1.00 seconds
    Conditions
    Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked player) slot status) Equal to Is playing [COLOR="DarkOrchid"]//Counts computers too, careful[/COLOR]
                    Then - Actions
                        Player Group - Add (Picked player) to [COLOR="SandyBrown"]Players[/COLOR]
                    Else - Actions
[COLOR="SandyBrown"]        Multiboard - Create a multiboard with 4 columns and (1 + (Number of players in Players)) rows, titled Multiboard![/COLOR]
        Multiboard - Set the text for (Last created multiboard) item in column 4, row 0 to 0
        Multiboard - Set the text for (Last created multiboard) item in column 3, row 0 to 0
        Multiboard - Set the display style for (Last created multiboard) item in column 1, row 0 to Hide text and Show icons
        Multiboard - Set the display style for (Last created multiboard) item in column 2, row 0 to Show text and Hide icons
        Multiboard - Set the display style for (Last created multiboard) item in column 3, row 0 to Show text and Hide icons
        Multiboard - Set the display style for (Last created multiboard) item in column 4, row 0 to Show text and Hide icons
        Multiboard - Set the width for (Last created multiboard) item in column 1, row 0 to 4.00% of the total screen width
        Multiboard - Set the width for (Last created multiboard) item in column 2, row 0 to 10.00% of the total screen width
        Multiboard - Set the width for (Last created multiboard) item in column 3, row 0 to 5.00% of the total screen width
        Multiboard - Set the width for (Last created multiboard) item in column 4, row 0 to 5.00% of the total screen width
        Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Icon
        Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to Players
        Multiboard - Set the text for (Last created multiboard) item in column 3, row 1 to Kills
        Multiboard - Set the text for (Last created multiboard) item in column 4, row 1 to Deaths
        For each (Integer A) from 2 to (1 + (Number of players in Players)), do (Actions)
            Loop - Actions
                Multiboard - Set the icon for (Last created multiboard) item in column 1, row (Integer A) to ReplaceableTextures\CommandButtons\BTNHeroPaladin.blp
                Multiboard - Set the text for (Last created multiboard) item in column 2, row (Integer A) to (Name of (Player(((Integer A) - 1))))
                Set playerRow[((Integer A) - 1)] = (Integer A)
        Multiboard - Show (Last created multiboard)
        Multiboard - Minimize (Last created multiboard)


Code:
Untitled Trigger 002
    Events
        Unit - A unit Dies
    Conditions
    Actions
        Set Kills[(Player number of (Owner of (Killing unit)))] = (Kills[(Player number of (Owner of (Killing unit)))] + 1)
        Set Deaths[(Player number of (Owner of (Triggering unit)))] = (Deaths[(Player number of (Owner of (Triggering unit)))] + 1)
        Multiboard - Set the text for (Last created multiboard) item in column 3, row playerRow[(Player number of (Owner of (Killing unit)))] to (String(Kills[(Player number of (Owner of (Killing unit)))]))
        Multiboard - Set the text for (Last created multiboard) item in column 4, row playerRow[(Player number of (Owner of (Triggering unit)))] to (String(Deaths[(Player number of (Owner of (Triggering unit)))]))

Output is this:
Code:
icon     players      kills    deaths
[Icon]   ManyTimes    10         0

Edit: Want something else besides "kills" and "deaths" to display in the multiboard... How about this: Draw something in paint, upload the picture somewhere and maybe someone is kind enough to create it for you... :p
 

Crazy-Host

New Member
Reaction score
0
That multiboard you did for me, thx.
Can u upload a map for me for that?
Im just lazy to do those triggers :/
and a bit confused on how to do some of em.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top