multiboard problem

emjlr3

Change can be a good thing
Reaction score
397
finally made the damn thing,,,,to me forever too

so im starting on the kills and death updates, i got them good for each player, but i also want them to do totals for team

so basically what ive been using is this

Code:
Events
    Unit - A unit Dies
Conditions
    (((Triggering unit) is A Hero) Equal to True) and (((Owner of (Dying unit)) controller) Equal to User)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        (Owner of (Dying unit)) Equal to Player 1 (Red)
    Then - Actions
        Set Death_Count[(Player number of (Owner of (Dying unit)))] = (Death_Count[(Player number of (Owner of (Dying unit)))] + 1)
        Multiboard - Set the text for (Last created multiboard) item in column 4, row 3 to (String(Death_Count[(Player number of (Owner of (Dying unit)))]))
    Else - Actions



that works fine for each player individually but when trying to do totals for each team it is not displaying at all for some reason when using this in the same trigger as above(same event and condition)

Code:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        ((Dying unit) belongs to an ally of Player 1 (Red)) Equal to True
    Then - Actions
        Set Death_Count[11] = (Death_Count[11] + 1)
        Multiboard - Set the text for (Last created multiboard) item in column 4, row 2 to (String(Death_Count[11]))
    Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Dying unit) belongs to an ally of Player 6 (Orange)) Equal to True
            Then - Actions
                Set Death_Count[12] = (Death_Count[12] + 1)
                Multiboard - Set the text for (Last created multiboard) item in column 4, row 8 to (String(Death_Count[12]))
            Else - Actions


any idea why?


btw this is the whole trigger if you need to see

Code:
Player Deaths Update
    Events
        Unit - A unit Dies
    Conditions
        (((Triggering unit) is A Hero) Equal to True) and (((Owner of (Dying unit)) controller) Equal to User)
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Dying unit)) Equal to Player 1 (Red)
            Then - Actions
                Set Death_Count[(Player number of (Owner of (Dying unit)))] = (Death_Count[(Player number of (Owner of (Dying unit)))] + 1)
                Multiboard - Set the text for (Last created multiboard) item in column 4, row 3 to (String(Death_Count[(Player number of (Owner of (Dying unit)))]))
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Owner of (Dying unit)) Equal to Player 2 (Blue)
                    Then - Actions
                        Set Death_Count[(Player number of (Owner of (Dying unit)))] = (Death_Count[(Player number of (Owner of (Dying unit)))] + 1)
                        Multiboard - Set the text for (Last created multiboard) item in column 4, row 4 to (String(Death_Count[(Player number of (Owner of (Dying unit)))]))
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Owner of (Dying unit)) Equal to Player 3 (Teal)
                            Then - Actions
                                Set Death_Count[(Player number of (Owner of (Dying unit)))] = (Death_Count[(Player number of (Owner of (Dying unit)))] + 1)
                                Multiboard - Set the text for (Last created multiboard) item in column 4, row 5 to (String(Death_Count[(Player number of (Owner of (Dying unit)))]))
                            Else - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (Owner of (Dying unit)) Equal to Player 4 (Purple)
                                    Then - Actions
                                        Set Death_Count[(Player number of (Owner of (Dying unit)))] = (Death_Count[(Player number of (Owner of (Dying unit)))] + 1)
                                        Multiboard - Set the text for (Last created multiboard) item in column 4, row 6 to (String(Death_Count[(Player number of (Owner of (Dying unit)))]))
                                    Else - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                (Owner of (Dying unit)) Equal to Player 5 (Yellow)
                                            Then - Actions
                                                Set Death_Count[(Player number of (Owner of (Dying unit)))] = (Death_Count[(Player number of (Owner of (Dying unit)))] + 1)
                                                Multiboard - Set the text for (Last created multiboard) item in column 4, row 7 to (String(Death_Count[(Player number of (Owner of (Dying unit)))]))
                                            Else - Actions
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        (Owner of (Dying unit)) Equal to Player 6 (Orange)
                                                    Then - Actions
                                                        Set Death_Count[(Player number of (Owner of (Dying unit)))] = (Death_Count[(Player number of (Owner of (Dying unit)))] + 1)
                                                        Multiboard - Set the text for (Last created multiboard) item in column 4, row 9 to (String(Death_Count[(Player number of (Owner of (Dying unit)))]))
                                                    Else - Actions
                                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                            If - Conditions
                                                                (Owner of (Dying unit)) Equal to Player 7 (Green)
                                                            Then - Actions
                                                                Set Death_Count[(Player number of (Owner of (Dying unit)))] = (Death_Count[(Player number of (Owner of (Dying unit)))] + 1)
                                                                Multiboard - Set the text for (Last created multiboard) item in column 4, row 10 to (String(Death_Count[(Player number of (Owner of (Dying unit)))]))
                                                            Else - Actions
                                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                    If - Conditions
                                                                        (Owner of (Dying unit)) Equal to Player 8 (Pink)
                                                                    Then - Actions
                                                                        Set Death_Count[(Player number of (Owner of (Dying unit)))] = (Death_Count[(Player number of (Owner of (Dying unit)))] + 1)
                                                                        Multiboard - Set the text for (Last created multiboard) item in column 4, row 11 to (String(Death_Count[(Player number of (Owner of (Dying unit)))]))
                                                                    Else - Actions
                                                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                            If - Conditions
                                                                                (Owner of (Dying unit)) Equal to Player 9 (Gray)
                                                                            Then - Actions
                                                                                Set Death_Count[(Player number of (Owner of (Dying unit)))] = (Death_Count[(Player number of (Owner of (Dying unit)))] + 1)
                                                                                Multiboard - Set the text for (Last created multiboard) item in column 4, row 12 to (String(Death_Count[(Player number of (Owner of (Dying unit)))]))
                                                                            Else - Actions
                                                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                    If - Conditions
                                                                                        (Owner of (Dying unit)) Equal to Player 10 (Light Blue)
                                                                                    Then - Actions
                                                                                        Set Death_Count[(Player number of (Owner of (Dying unit)))] = (Death_Count[(Player number of (Owner of (Dying unit)))] + 1)
                                                                                        Multiboard - Set the text for (Last created multiboard) item in column 4, row 13 to (String(Death_Count[(Player number of (Owner of (Dying unit)))]))
                                                                                    Else - Actions
                                                                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                            If - Conditions
                                                                                                ((Dying unit) belongs to an ally of Player 1 (Red)) Equal to True
                                                                                            Then - Actions
                                                                                                Set Death_Count[11] = (Death_Count[11] + 1)
                                                                                                Multiboard - Set the text for (Last created multiboard) item in column 4, row 2 to (String(Death_Count[11]))
                                                                                            Else - Actions
                                                                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                                    If - Conditions
                                                                                                        ((Dying unit) belongs to an ally of Player 6 (Orange)) Equal to True
                                                                                                    Then - Actions
                                                                                                        Set Death_Count[12] = (Death_Count[12] + 1)
                                                                                                        Multiboard - Set the text for (Last created multiboard) item in column 4, row 8 to (String(Death_Count[12]))
                                                                                                    Else - Actions
 
Couple-a notes:

Use (Dying unit) instead of (Triggering unit). :p

There's no point using the And condition. All the conditions you add are automatically And'ed.

Why do you have that If? Why not just put all three conditions in the condition section?

Other than that, I'm not sure. Are both player 1 and player 6 in the game?

Edit: Oh, the problem is your last If statements are in the Else section; so they will only run if the dying unit is not owned by players 1 through 10. Just take it out of the Else.
 
i changed to this, should it work now?
Code:
Player Deaths Update
    Events
        Unit - A unit Dies
    Conditions
        (((Dying unit) is A Hero) Equal to True) and (((Owner of (Dying unit)) controller) Equal to User)
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Dying unit) belongs to an ally of Player 6 (Orange)) Equal to True
            Then - Actions
                Set Death_Count[12] = (Death_Count[12] + 1)
                Multiboard - Set the text for (Last created multiboard) item in column 4, row 8 to (String(Death_Count[12]))
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Dying unit) belongs to an ally of Player 1 (Red)) Equal to True
            Then - Actions
                Set Death_Count[11] = (Death_Count[11] + 1)
                Multiboard - Set the text for (Last created multiboard) item in column 4, row 2 to (String(Death_Count[11]))
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Dying unit)) Equal to Player 10 (Light Blue)
            Then - Actions
                Set Death_Count[(Player number of (Owner of (Dying unit)))] = (Death_Count[(Player number of (Owner of (Dying unit)))] + 1)
                Multiboard - Set the text for (Last created multiboard) item in column 4, row 13 to (String(Death_Count[(Player number of (Owner of (Dying unit)))]))
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Dying unit)) Equal to Player 9 (Gray)
            Then - Actions
                Set Death_Count[(Player number of (Owner of (Dying unit)))] = (Death_Count[(Player number of (Owner of (Dying unit)))] + 1)
                Multiboard - Set the text for (Last created multiboard) item in column 4, row 12 to (String(Death_Count[(Player number of (Owner of (Dying unit)))]))
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Dying unit)) Equal to Player 8 (Pink)
            Then - Actions
                Set Death_Count[(Player number of (Owner of (Dying unit)))] = (Death_Count[(Player number of (Owner of (Dying unit)))] + 1)
                Multiboard - Set the text for (Last created multiboard) item in column 4, row 11 to (String(Death_Count[(Player number of (Owner of (Dying unit)))]))
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Dying unit)) Equal to Player 7 (Green)
            Then - Actions
                Set Death_Count[(Player number of (Owner of (Dying unit)))] = (Death_Count[(Player number of (Owner of (Dying unit)))] + 1)
                Multiboard - Set the text for (Last created multiboard) item in column 4, row 10 to (String(Death_Count[(Player number of (Owner of (Dying unit)))]))
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Dying unit)) Equal to Player 6 (Orange)
            Then - Actions
                Set Death_Count[(Player number of (Owner of (Dying unit)))] = (Death_Count[(Player number of (Owner of (Dying unit)))] + 1)
                Multiboard - Set the text for (Last created multiboard) item in column 4, row 9 to (String(Death_Count[(Player number of (Owner of (Dying unit)))]))
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Dying unit)) Equal to Player 5 (Yellow)
            Then - Actions
                Set Death_Count[(Player number of (Owner of (Dying unit)))] = (Death_Count[(Player number of (Owner of (Dying unit)))] + 1)
                Multiboard - Set the text for (Last created multiboard) item in column 4, row 7 to (String(Death_Count[(Player number of (Owner of (Dying unit)))]))
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Dying unit)) Equal to Player 4 (Purple)
            Then - Actions
                Set Death_Count[(Player number of (Owner of (Dying unit)))] = (Death_Count[(Player number of (Owner of (Dying unit)))] + 1)
                Multiboard - Set the text for (Last created multiboard) item in column 4, row 6 to (String(Death_Count[(Player number of (Owner of (Dying unit)))]))
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Dying unit)) Equal to Player 3 (Teal)
            Then - Actions
                Set Death_Count[(Player number of (Owner of (Dying unit)))] = (Death_Count[(Player number of (Owner of (Dying unit)))] + 1)
                Multiboard - Set the text for (Last created multiboard) item in column 4, row 5 to (String(Death_Count[(Player number of (Owner of (Dying unit)))]))
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Dying unit)) Equal to Player 2 (Blue)
            Then - Actions
                Set Death_Count[(Player number of (Owner of (Dying unit)))] = (Death_Count[(Player number of (Owner of (Dying unit)))] + 1)
                Multiboard - Set the text for (Last created multiboard) item in column 4, row 4 to (String(Death_Count[(Player number of (Owner of (Dying unit)))]))
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Dying unit)) Equal to Player 1 (Red)
            Then - Actions
                Set Death_Count[(Player number of (Owner of (Dying unit)))] = (Death_Count[(Player number of (Owner of (Dying unit)))] + 1)
                Multiboard - Set the text for (Last created multiboard) item in column 4, row 3 to (String(Death_Count[(Player number of (Owner of (Dying unit)))]))
            Else - Actions


each one is its own if, is that what you meant?

edit: yep works now ty for help!
 
It should work. But you only needed to do that for the very last two Ifs. The rest could stay nested.
 
is it better that way or does it not really matter?
 
emjlr3 said:
is it better that way or does it not really matter?
It might be slightly better.

But while we're on the subject of better, that whole trigger could be massively simplified. That's a heck of a lot of Ifs.

You may just want to leave what works alone. ;)
 
yea i realise that but im not that great with them in the first palce this is my first one

i kinda know how its done, i did it for the player names

Code:
create
    Events
        Time - Elapsed game time is 0.50 seconds
    Conditions
    Actions
        Multiboard - Destroy (Last created multiboard)
        Multiboard - Create a multiboard with 4 columns and 16 rows, titled DotA Ed Edition bet...
        Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Player
        Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to Dead?
        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
        Multiboard - Set the text for (Last created multiboard) item in column 1, row 2 to (Player_Colors[11] + (The Sentinel + |r))
        Multiboard - Set the text for (Last created multiboard) item in column 1, row 8 to (Player_Colors[12] + (The Scourge + |r))
        Multiboard - Set the text for (Last created multiboard) item in column 3, row 8 to 0
        Multiboard - Set the text for (Last created multiboard) item in column 4, row 8 to 0
        Multiboard - Set the text for (Last created multiboard) item in column 4, row 2 to 0
        Multiboard - Set the text for (Last created multiboard) item in column 3, row 2 to 0
        For each (Integer A) from 1 to 16, do (Actions)
            Loop - Actions
                Multiboard - Set the width for (Last created multiboard) item in column 1, row (Integer A) to 9.80% of the total screen width
                Multiboard - Set the width for (Last created multiboard) item in column 2, row (Integer A) to 4.20% 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
                Multiboard - Set the width for (Last created multiboard) item in column 4, row (Integer A) to 4.60% of the total screen width
                Multiboard - Set the color for (Last created multiboard) item in column 2, row (Integer A) to (86.20%, 86.20%, 0.00%) with 0.00% transparency
                Multiboard - Set the color for (Last created multiboard) item in column 3, row (Integer A) to (100.00%, 0.00%, 0.00%) with 0.00% transparency
                Multiboard - Set the color for (Last created multiboard) item in column 4, row (Integer A) to (0.00%, 5.00%, 100.00%) with 0.00% transparency
        For each (Integer A) from 2 to 6, do (Actions)
            Loop - Actions
                Multiboard - Set the text for (Last created multiboard) item in column 1, row ((Integer A) + 1) to (Player_Colors[((Integer A) - 1)] + ((Name of (Player(((Integer A) - 1)))) + |r))
                Multiboard - Set the text for (Last created multiboard) item in column 2, row ((Integer A) + 1) to NO
                Multiboard - Set the text for (Last created multiboard) item in column 3, row ((Integer A) + 1) to 0
                Multiboard - Set the text for (Last created multiboard) item in column 4, row ((Integer A) + 1) to 0
        For each (Integer A) from 8 to 12, do (Actions)
            Loop - Actions
                Multiboard - Set the text for (Last created multiboard) item in column 1, row ((Integer A) + 1) to (Player_Colors[((Integer A) - 2)] + ((Name of (Player(((Integer A) - 2)))) + |r))
                Multiboard - Set the text for (Last created multiboard) item in column 2, row ((Integer A) + 1) to NO
                Multiboard - Set the text for (Last created multiboard) item in column 3, row ((Integer A) + 1) to 0
                Multiboard - Set the text for (Last created multiboard) item in column 4, row ((Integer A) + 1) to 0
        For each (Integer A) from 1 to 4, do (Actions)
            Loop - Actions
                For each (Integer B) from 1 to 16, do (Actions)
                    Loop - Actions
                        Multiboard - Set the display style for (Last created multiboard) item in column (Integer A), row (Integer B) to Show text and Hide icons
        Multiboard - Set the text for (Last created multiboard) item in column 1, row 14 to Time Elapsed
        Multiboard - Set the color for (Last created multiboard) item in column 3, row 14 to (100.00%, 100.00%, 100.00%) with 0.00% transparency
        Multiboard - Set the text for (Last created multiboard) item in column 1, row 15 to (Player_Colors[11] + (Towers Lost + |r))
        Multiboard - Set the text for (Last created multiboard) item in column 1, row 16 to (Player_Colors[12] + (Towers Lost + |r))
        Multiboard - Set the text for (Last created multiboard) item in column 3, row 15 to (Player_Colors[11] + (0 + |r))
        Multiboard - Set the text for (Last created multiboard) item in column 3, row 16 to (Player_Colors[12] + (0 + |r))
        Multiboard - Show (Last created multiboard)


but i tried doing something similar for the kills and i just could not get it to work right, so i did it the long way ;Ăž, if you were real nice you could write me one simplified that would work like mine so I could see how in the Hell to do it....jk :)
 
emjlr3 said:
if you were real nice you could write me one simplified that would work like mine so I could see how in the Hell to do it....jk :)
Okay, I'll bite. :P
Code:
Death Count Update
    Events
        Unit - A unit Dies
    Conditions
        ((Dying unit) is A Hero) Equal to True
        ((Owner of (Dying unit)) controller) Equal to User
    Actions
        Set TempPlayerNumber = (Player number of (Owner of (Dying unit)))
        Set DeathCount[TempPlayerNumber] = (DeathCount[TempPlayerNumber] + 1)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Dying unit) belongs to an ally of Player 1 (Red)) Equal to True
            Then - Actions
                Multiboard - Set the text for (Last created multiboard) item in column 4, row (TempPlayerNumber + 2) to (String(DeathCount[TempPlayerNumber]))
                Set DeathCount[11] = (DeathCount[11] + 1)
                Multiboard - Set the text for (Last created multiboard) item in column 4, row 2 to (String(DeathCount[11]))
            Else - Actions
                Multiboard - Set the text for (Last created multiboard) item in column 4, row (TempPlayerNumber + 3) to (String(DeathCount[TempPlayerNumber]))
                Set DeathCount[12] = (DeathCount[12] + 1)
                Multiboard - Set the text for (Last created multiboard) item in column 4, row 8 to (String(DeathCount[12]))
 
heh, ty for that, but that part I kinda got, that was pretty simple

the harder part is making it real simple for each players kills, like adding the names in when you create the multiboard, but for kills

but since my board has players in rows 2-7 and 9-13, not just like 1-10, you cant just do a continous thing, so that is where i am stuck
 
You can create an "association" array, called, say, PlayerMultiboardIndex. With a bit of fancy triggering you could get PlayerMultiboardIndex[1] to be the row number that player 1 is in, etc.
 
yep that sounds a bit to out of my league at atm, that is why i must do it the long way.... :(
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    Wow - the change in the stats are major. I kind of knew it was all bots but wow, to see the effect. Why the social media sites cant do something like this I have no idea.
  • Ghan Ghan:
    Probably inflates their numbers so they look better to advertisers.
  • The Helper The Helper:
    Yeah google does not filter those bots. I remember when Apex was doing Google ads I saw the same IPs in there as I was seeing here - google is totally tracking all those bots as traffic and most google traffic, at least ours, was all bots
  • The Helper The Helper:
    oh wow, i bet i can post x links now and do the webp pics now giggity
  • The Helper The Helper:
    ahh anubis blocks anyone that has javascript turned off
  • The Helper The Helper:
    Robot: HTTP client library - i love the new robot :)
  • The Helper The Helper:
    New Science News Forum and it starts out with 420 threads :)
  • The Helper The Helper:
    Technical Support forum name changed To Technology News, there is now a Tech, sci/tech and science forums now :)
  • The Helper The Helper:
    Happy Saturday! Hope everyone has a fantastic weekend!
  • Ghan Ghan:
    We are now on Ubuntu 24.04. Had some issues with the style after the OS/PHP upgrade but now resolved.
    +1
  • Ghan Ghan:
    PHP 8.3 now live
    +1
  • The Helper The Helper:
    Weekend went by too fast. Next weekend I am going to try to do a nature thing - buddy of mine lives by the Colorado river and has some kayaks and invited me to do some kayaking from a place he knows to get on the river.
  • Ghan Ghan:
    That sounds like an adventure.
  • The Helper The Helper:
    400 users all online all looking at latest content
  • The Helper The Helper:
    I wonder how all these bots that sit on the lastest content page get passed anubis or maybe they did not but they are just registering on whos online
  • The Helper The Helper:
    showing up on whos online not registration
  • Ghan Ghan:
    The first gate is stopping all the bots that don't execute javascript.
  • Ghan Ghan:
    That's the main thing with Anubis - no Javascript, no site. Typically you can still get the site to load without Javascript.
  • The Helper The Helper:
    I remember the whole javascript thing, question - how many real people disable that?
  • The Helper The Helper:
    Hell I guess I could go back on the stats to know that - we probably capture that and we know the before and after
  • Ghan Ghan:
    Real users can't really disable Javascript anymore these days.
  • Ghan Ghan:
    The internet is broken without it.
  • Ghan Ghan:
    Bot readable, not human usable.
  • The Helper The Helper:
    got it
  • The Helper The Helper:
    Happy Thursday!

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top