Needing a multiboard code

sionts

New Member
Reaction score
0
Anyone got multiboard trigger codes with kills and deaths. The dota template isn't helping me. The more players are playing the more the player naems exceed the multiboard box. Basically the box wont incrase size when the more players are playing, well this is what happens with the dota template multiboard.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
The DotA Template creates a multiboard of size "6 + PlayersCount",
where PlayersCount is the number of players in the player group "Players",
set to all players that are "is playing".

It always has the correct size.

You probably just missed an action or two.

Care to post your multiboard setup (all of it)?
 

sionts

New Member
Reaction score
0
Code:
MultiBoard Setup

Events
    Time - Elapsed game time is 16.00 seconds
Conditions
Actions
    Countdown Timer - Start Game_Timer as a One-shot timer that will expire in 999999.00 seconds
    Leaderboard - Create a leaderboard for West_Players titled West Side Heroes
    Set LeaderBoardWestForce = (Last created leaderboard)
    Leaderboard - Hide LeaderBoardWestForce
    Leaderboard - Create a leaderboard for East_Players titled East Side Heroes
    Set LeaderBoardEastForce = (Last created leaderboard)
    Leaderboard - Hide LeaderBoardWestForce
    Player Group - Pick every player in West_Players and do (Actions)
        Loop - Actions
            Leaderboard - Add (Picked player) to LeaderBoardWestForce with label (Name of (Picked player)) and value 0
    Player Group - Pick every player in East_Players and do (Actions)
        Loop - Actions
            Leaderboard - Add (Picked player) to LeaderBoardEastForce with label (Name of (Picked player)) and value 0
    Trigger - Run Create Multiboard <gen> (ignoring conditions)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        If - Conditions
            MultiBoard_ShowDeaths Equal to True
        Then - Actions
            Trigger - Turn on Tally Deaths <gen>
        Else - Actions

Code:
Create MultiBoard

Events
Conditions
Actions
    Multiboard - Create a multiboard with 4 columns and (6 + Player_Count) rows, titled Hero Team Arena
    Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Player
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        If - Conditions
            MultiBoard_ShowDeaths Equal to True
        Then - Actions
            Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to Dead
        Else - Actions
    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 display style for (Last created multiboard) item in column 0, row 0 to Show text and Hide icons
    Multiboard - Set the width for (Last created multiboard) item in column 1, row 0 to 10.00% of the total screen width
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        If - Conditions
            MultiBoard_ShowDeaths Equal to True
        Then - Actions
            Multiboard - Set the width for (Last created multiboard) item in column 2, row 0 to 4.00% of the total screen width
        Else - Actions
            Multiboard - Set the width for (Last created multiboard) item in column 2, row 0 to 0.50% of the total screen width
    Multiboard - Set the width for (Last created multiboard) item in column 3, row 0 to 3.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 color for (Last created multiboard) item in column 2, row 0 to (70.00%, 70.00%, 70.00%) with 0.00% transparency
    Multiboard - Set the color for (Last created multiboard) item in column 3, row 0 to (70.00%, 70.00%, 70.00%) with 0.00% transparency
    Multiboard - Set the color for (Last created multiboard) item in column 4, row 0 to (70.00%, 70.00%, 70.00%) with 0.00% transparency
    Trigger - Run Sort Multiboard <gen> (ignoring conditions)
    Set TempInteger = 2
    Set MultiBoard_Spots[1] = TempInteger
    Multiboard - Set the text for (Last created multiboard) item in column 1, row TempInteger to West Side Heroes
    Multiboard - Set the text for (Last created multiboard) item in column 2, row TempInteger to  
    Multiboard - Set the text for (Last created multiboard) item in column 3, row TempInteger to  0
    Multiboard - Set the text for (Last created multiboard) item in column 4, row TempInteger to   0
    Set TempInteger = ((Number of players in West_Players) + 4)
    Set MultiBoard_Spots[7] = TempInteger
    Multiboard - Set the text for (Last created multiboard) item in column 1, row TempInteger to East Side Heroes
    Multiboard - Set the text for (Last created multiboard) item in column 2, row TempInteger to  
    Multiboard - Set the text for (Last created multiboard) item in column 3, row TempInteger to  0
    Multiboard - Set the text for (Last created multiboard) item in column 4, row TempInteger to   0
    Set MultiBoard_Clock = (Player_Count + 6)
    Multiboard - Set the text for (Last created multiboard) item in column 1, row MultiBoard_Clock to Game Time:
    Multiboard - Set the text for (Last created multiboard) item in column 3, row MultiBoard_Clock to 0:00
    Multiboard - Set the color for (Last created multiboard) item in column 2, row 1 to (100.00%, 100.00%, 100.00%) with 0.00% transparency
    Multiboard - Set the color for (Last created multiboard) item in column 3, row 1 to (100.00%, 100.00%, 100.00%) with 0.00% transparency
    Multiboard - Set the color for (Last created multiboard) item in column 4, row 1 to (100.00%, 100.00%, 100.00%) with 0.00% transparency
    Multiboard - Show (Last created multiboard)

Code:
Tally Scores

Events
    Unit - A unit Dies
Conditions
    ((Dying unit) is A Hero) Equal to True
    (Player number of (Owner of (Killing unit))) Greater than 0
    (Player number of (Owner of (Killing unit))) Less than or equal to 12
Actions
    Set Score_Kills[(Player number of (Owner of (Killing unit)))] = (Score_Kills[(Player number of (Owner of (Killing unit)))] + 1)
    Set Score_Deaths[(Player number of (Owner of (Dying unit)))] = (Score_Deaths[(Player number of (Owner of (Dying unit)))] + 1)
    If (((Owner of (Dying unit)) is in West_Players) Equal to True) then do (Set Score_Deaths[1] = (Score_Deaths[1] + 1)) else do (Do nothing)
    If (((Owner of (Dying unit)) is in East_Players) Equal to True) then do (Set Score_Deaths[7] = (Score_Deaths[7] + 1)) else do (Do nothing)
    Set TempInteger = (((Hero level of (Dying unit)) x 5) + 100)
    Player - Add TempInteger to (Owner of (Killing unit)) Current gold
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        If - Conditions
            ((Owner of (Killing unit)) is in West_Players) Equal to True
        Then - Actions
            Set Score_Kills[1] = (Score_Kills[1] + 1)
        Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        If - Conditions
            ((Owner of (Killing unit)) is in East_Players) Equal to True
        Then - Actions
            Set Score_Kills[7] = (Score_Kills[7] + 1)
        Else - Actions
    Trigger - Run Sort Multiboard <gen> (checking conditions)
    Multiboard - Set the text for (Last created multiboard) item in column 3, row MultiBoard_Spots[1] to (  + (String(Score_Kills[1])))
    Multiboard - Set the text for (Last created multiboard) item in column 3, row MultiBoard_Spots[7] to (  + (String(Score_Kills[7])))
    Multiboard - Set the text for (Last created multiboard) item in column 4, row MultiBoard_Spots[1] to (   + (String(Score_Deaths[1])))
    Multiboard - Set the text for (Last created multiboard) item in column 4, row MultiBoard_Spots[7] to (  + (String(Score_Deaths[7])))

Code:
Tally Deaths

Events
    Time - Every 1.00 seconds of game time
Conditions
    (Revivable_Heroes is empty) Equal to False
Actions
    Unit Group - Pick every unit in Revivable_Heroes and do (Actions)
        Loop - Actions
            Multiboard - Set the text for (Last created multiboard) item in column 2, row MultiBoard_Spots[(Player number of (Owner of (Picked unit)))] to (String((Integer((Remaining time for ReviveTimers[(Player number of (Owner of (Picked unit)))])))))

Code:
Sort MultiBoard

Events
Conditions
Actions
    Player Group - Pick every player in West_Players and do (Actions)
        Loop - Actions
            Leaderboard - Change the value for (Picked player) in LeaderBoardWestForce to ((Score_Kills[(Player number of (Picked player))] x 10000) - Score_Deaths[(Player number of (Picked player))])
    Player Group - Pick every player in East_Players and do (Actions)
        Loop - Actions
            Leaderboard - Change the value for (Picked player) in LeaderBoardEastForce to ((Score_Kills[(Player number of (Picked player))] x 10000) - Score_Deaths[(Player number of (Picked player))])
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        If - Conditions
            LeaderboardKillSeting Equal to True
        Then - Actions
            Leaderboard - Sort LeaderBoardWestForce by Value in Descending order
            Leaderboard - Sort LeaderBoardEastForce by Value in Descending order
        Else - Actions
            Leaderboard - Sort LeaderBoardWestForce by Player in Ascending order
            Leaderboard - Sort LeaderBoardEastForce by Player in Ascending order
    Set TempInteger = 2
    Player Group - Pick every player in West_Players and do (Actions)
        Loop - Actions
            Set MultiBoard_Spots[(Player number of (Picked player))] = ((Position of (Picked player) in LeaderBoardWestForce) + TempInteger)
    Set TempInteger = ((Number of players in West_Players) + 4)
    Player Group - Pick every player in East_Players and do (Actions)
        Loop - Actions
            Set MultiBoard_Spots[(Player number of (Picked player))] = ((Position of (Picked player) in LeaderBoardEastForce) + TempInteger)
    Player Group - Pick every player in Active_Players and do (Actions)
        Loop - Actions
            Set TempInteger = (Player number of (Picked player))
            Multiboard - Set the text for (Last created multiboard) item in column 1, row MultiBoard_Spots[TempInteger] to PlayerNames[TempInteger]
            Multiboard - Set the text for (Last created multiboard) item in column 2, row MultiBoard_Spots[TempInteger] to  
            Multiboard - Set the text for (Last created multiboard) item in column 3, row MultiBoard_Spots[TempInteger] to (  + (String(Score_Kills[TempInteger])))
            Multiboard - Set the text for (Last created multiboard) item in column 4, row MultiBoard_Spots[TempInteger] to (   + (String(Score_Deaths[TempInteger])))

Thought i'd give you the whole thing, just incase i might come accross any other annoying things.

Okay, my map has 2 teams each team has 6 players. Also when you select a hero and passive hero dies in the hero select terrain it goes to the triggering players score '1 kill'.

The main thing is, the multiboard size doesnt get any bigger if more players are playing. So the player names exceed the multiboard box.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> Multiboard - Create a multiboard with 4 columns and (6 + Player_Count) rows, titled Hero Team Arena

Well, "Player_Count" is never set to any value. At least not in the triggers posted.


You should do so, before the "Trigger - Run Create Multiboard <gen> (ignoring conditions)" action.

Something like "Set Player_Count = Number of Players in East_Players + Number of Players in West_Players" (or "Set Player_Count = Number of Players in Active_Players").
Assuming those groups are already set up by then.
Actually, I would put that "set player_count" action after the actions that prepare those two groups.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
If you have all players in "Active_Players", just use that.

If not, start the right side with "Arithmetic", which should already be there, at the very top.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Well, you are using, for example, "Player Group - Pick every player in East_Players".

So, I guess there actually are some players in "East_Players"?
It's a variable of type "player group", those start as empty groups.
And you need to put some players inside first before you can use it.
 

sionts

New Member
Reaction score
0
So i place the "set player_count = number of players in Active_player" under
"Set East_Players = (All players matching ((((Matching player) is in Active_Players) Equal to True) and (((Matching player) is an enemy of Player 1 (Red)) Equal to True)))"
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
For example, yes.
I would put it after the action that adds the players to "Active_Players".

There are some actions that put players into "Active_Players", right?
 

sionts

New Member
Reaction score
0
nah i kinda figured it would go under active_players. Would this fix the multiboard size? when more players are playing?
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> Would this fix the multiboard size?

It should.
Though you would see it I guess...


For your team score, I'd suggest a little test:

After your "set east_players = ..." add:
Game - Display to (all players) the text: "East team:"
Pick every player in East_Players" and do
- Game - Display to (all players) the text: Name of (Picked player)

and, after the "set west_players = ..."
Game - Display to (all players) the text: "West team:"
Pick every player in West_Players" and do
- Game - Display to (all players) the text: Name of (Picked player)


Does it show the correct players? All of them? The comp too?
 

sionts

New Member
Reaction score
0
im not sure what to do with what you just gave me?

"Set East_Players = (All players matching ((((Matching player) is in Active_Players) Equal to True) and (((Matching player) is an enemy of Player 1 (Red)) Equal to True)))" is in my "map initialization" trigger

im not sure what im suppose to do with


After your "set east_players = ..." add:
Game - Display to (all players) the text: "East team:"
Pick every player in East_Players" and do
- Game - Display to (all players) the text: Name of (Picked player)

and, after the "set west_players = ..."
Game - Display to (all players) the text: "West team:"
Pick every player in West_Players" and do
- Game - Display to (all players) the text: Name of (Picked player)
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
The idea is that the map tells you what players it did put in what team.
To see if the teams actually have the players that are supposed to be in that team.

You can add it to "map init" if you want.
Though you must read somewhat faster since the text will disappear rather quickly.

Or make a new trigger, with the event "time - elapsed time is 2 seconds",
and show the teams in that trigger.

Or, just for starters, post all team lines you have, the one for "Active_Players", the one for "East_Players" and the one for "West_Players".
And, in the same order as they are in your triggers.
 

sionts

New Member
Reaction score
0
>Or, just for starters, post all team lines you have, the one for "Active_Players", the one for "East_Players" and the one for "West_Players".

Code:
-------- Set Player Groups --------
Set Active_Players = (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)))
Set Player_Count = (Number of players in Active_Players)
Set West_Players = (All players matching ((((Matching player) is in Active_Players) Equal to True) and (((Matching player) is an enemy of Player 7 (Green)) Equal to True)))
Set East_Players = (All players matching ((((Matching player) is in Active_Players) Equal to True) and (((Matching player) is an enemy of Player 1 (Red)) Equal to True)))
I this what you wanted?
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Unfortunately, this looks correct.

Hm...


> When I kill a player, the team score stays at zero it doesn't +1

And, does your own score change?
 

sionts

New Member
Reaction score
0
yeah the players score does change.

By the way, it showed west teams and east teams text but it didnt show "worldedit"
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Hm... all of this sounds very weird.
There must be some small detail somewhere I'm missing.

Here's a once-in-a-lifetime offer:
Post your map, and I'll have a look.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top