Little Multiboard Problem...

n00b1l1ty

Lєgєπd of Mysтicfаlcoи
Reaction score
46
Hello all.
I made a multiboard system with hero icons on multiboard. But the problem is when a player buys a hero from tavern all players' icons are being the same hero icon. (I'm using DotA Template's Multiboard system).

Here is the trigger...

Code:
Heroes
    Events
        Unit - A unit Sells a unit
    Conditions
    Actions
        For each (Integer A) from 1 to 36, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Unit-type of (Sold unit)) Equal to Hero_Types[(Integer A)]
                    Then - Actions
                        Set Hero_Ints = (Integer A)
                    Else - Actions
                        Do nothing
        Set TempInteger = 2
        Player Group - Pick every player in PlayersSentinel and do (Actions)
            Loop - Actions
                Set Multiboard_Spots[(Player number of (Picked player))] = ((Position of (Picked player) in LeaderboardSentinel) + TempInteger)
        Set TempInteger = ((Number of players in PlayersSentinel) + 4)
        Player Group - Pick every player in PlayersScourge and do (Actions)
            Loop - Actions
                Set Multiboard_Spots[(Player number of (Picked player))] = ((Position of (Picked player) in LeaderboardScourge) + TempInteger)
        Player Group - Pick every player in Players and do (Actions)
            Loop - Actions
                Set TempInteger = (Player number of (Picked player))
                Multiboard - Set the display style for (Last created multiboard) item in column 5, row Multiboard_Spots[TempInteger] to Show text and Show icons
                Multiboard - Set the icon for (Last created multiboard) item in column 5, row Multiboard_Spots[TempInteger] to Hero_Icons[Hero_Ints]
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
(Picked player)

You're picking all players and setting TempInteger as all players, doing this makes it change everyone.
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
Set it to an array variable then do it I guess based on player number.
 

Artificial

Without Intelligence
Reaction score
326
Code:
Player Group - Pick every player in Players and do (Actions)
            Loop - Actions
                Set TempInteger = (Player number of (Picked player))
                Multiboard - Set the display style for (Last created multiboard) item in column 5, row Multiboard_Spots[TempInteger] to Show text and Show icons
                Multiboard - Set the icon for (Last created multiboard) item in column 5, row Multiboard_Spots[TempInteger] to Hero_Icons[Hero_Ints]
->
Code:
Set TempInteger = (Player number of (Owner of (Sold unit)))
Multiboard - Set the display style for (Last created multiboard) item in column 5, row Multiboard_Spots[TempInteger] to Show text and Show icons
Multiboard - Set the icon for (Last created multiboard) item in column 5, row Multiboard_Spots[TempInteger] to Hero_Icons[Hero_Ints]
That should work, although that's not the best possible way of doing this.
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
You can do For each Integer A, 1 through 12 or so.
 

n00b1l1ty

Lєgєπd of Mysтicfаlcoи
Reaction score
46
Code:
Player Group - Pick every player in Players and do (Actions)
            Loop - Actions
                Set TempInteger = (Player number of (Picked player))
                Multiboard - Set the display style for (Last created multiboard) item in column 5, row Multiboard_Spots[TempInteger] to Show text and Show icons
                Multiboard - Set the icon for (Last created multiboard) item in column 5, row Multiboard_Spots[TempInteger] to Hero_Icons[Hero_Ints]
->
Code:
Set TempInteger = (Player number of (Owner of (Sold unit)))
Multiboard - Set the display style for (Last created multiboard) item in column 5, row Multiboard_Spots[TempInteger] to Show text and Show icons
Multiboard - Set the icon for (Last created multiboard) item in column 5, row Multiboard_Spots[TempInteger] to Hero_Icons[Hero_Ints]
That should work, although that's not the best possible way of doing this.

It worked perfectly thank you.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top