• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Multiple individual multiboard issue

Status
Not open for further replies.
Level 17
Joined
Nov 13, 2006
Messages
1,814
i made 2 multiboard trigger
- create a multiboard, hide last created and show to each player a different multiboard
1st
  • Set Multiboard[(Integer A)] = (Last created multiboard)
  • Multiboard - Hide Multiboard[(Integer A)]
  • Custom script: if ( GetLocalPlayer() == Player(GetForLoopIndexA()-1) ) then
  • Multiboard - Show Multiboard[(Integer A)]
  • Custom script: endif
2nd
  • Set Multiboard_stat[(Integer A)] = (Last created multiboard)
  • Multiboard - Hide Multiboard_stat[(Integer A)]
  • Custom script: if ( GetLocalPlayer() == Player(GetForLoopIndexA()-1) ) then
  • Multiboard - Show Multiboard_stat[(Integer A)]
  • Custom script: endif
but only 2nd appeared in game :/
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
if you mean this then with this not appeared any multiboard :/
  • Multiboard creating
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Set TempNr = 10
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Multiboard - Create a multiboard with 2 columns and TempNr rows, titled Heroes
          • Multiboard - Change the color of the title for (Last created multiboard) to (100.00%, 70.00%, 70.00%) with 0.00% transparency
          • For each (Integer A) from 1 to TempNr, do (Actions)
            • Loop - Actions
              • Multiboard - Set the width for (Last created multiboard) item in column 1, row (Integer A) to 8.00% of the total screen width
              • Multiboard - Set the width for (Last created multiboard) item in column 2, row (Integer A) to 8.00% of the total screen width
              • Multiboard - Set the text for (Last created multiboard) item in column 2, row (Integer A) to Empty
              • 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 text for (Last created multiboard) item in column 1, row 1 to Gear
          • Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to Equiped
          • Multiboard - Set the color for (Last created multiboard) item in column 1, row 1 to (100.00%, 100.00%, 20.00%) with 0.00% transparency
          • Multiboard - Set the color for (Last created multiboard) item in column 2, row 1 to (100.00%, 100.00%, 20.00%) with 0.00% transparency
          • Multiboard - Set the display style for (Last created multiboard) item in column 1, row 1 to Show text and Hide icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 2, row 1 to Show text and Hide icons
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row 2 to Headgear
          • Multiboard - Set the icon for (Last created multiboard) item in column 1, row 2 to ReplaceableTextures\CommandButtons\BTNCirclet.blp
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row 3 to Armor
          • Multiboard - Set the icon for (Last created multiboard) item in column 1, row 3 to ReplaceableTextures\CommandButtons\BTNImprovedMoonArmor.blp
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row 4 to Weapon
          • Multiboard - Set the icon for (Last created multiboard) item in column 1, row 4 to ReplaceableTextures\CommandButtons\BTNHammer.blp
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row 5 to Shield
          • Multiboard - Set the icon for (Last created multiboard) item in column 1, row 5 to ReplaceableTextures\CommandButtons\BTNHumanArmorUpTwo.blp
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row 6 to Boots
          • Multiboard - Set the icon for (Last created multiboard) item in column 1, row 6 to ReplaceableTextures\CommandButtons\BTNBootsOfSpeed.blp
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row 7 to 1. Ring
          • Multiboard - Set the icon for (Last created multiboard) item in column 1, row 7 to ReplaceableTextures\CommandButtons\BTNRingGreen.blp
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row 8 to 2. Ring
          • Multiboard - Set the icon for (Last created multiboard) item in column 1, row 8 to ReplaceableTextures\CommandButtons\BTNRingGreen.blp
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row 9 to Amulet
          • Multiboard - Set the icon for (Last created multiboard) item in column 1, row 9 to ReplaceableTextures\CommandButtons\BTNAmulet.blp
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row 10 to Special
          • Multiboard - Set the icon for (Last created multiboard) item in column 1, row 10 to ReplaceableTextures\CommandButtons\BTNCrate.blp
          • Set Multiboard[(Integer A)] = (Last created multiboard)
          • Set TempNr = 10
          • Multiboard - Create a multiboard with 2 columns and TempNr rows, titled Stat
          • Multiboard - Change the color of the title for (Last created multiboard) to (100.00%, 70.00%, 70.00%) with 0.00% transparency
          • For each (Integer B) from 1 to TempNr, do (Actions)
            • Loop - Actions
              • Multiboard - Set the width for (Last created multiboard) item in column 1, row (Integer B) to 14.00% of the total screen width
              • Multiboard - Set the width for (Last created multiboard) item in column 2, row (Integer B) to 3.00% of the total screen width
              • Multiboard - Set the text for (Last created multiboard) item in column 2, row (Integer B) to 0
              • Multiboard - Set the display style for (Last created multiboard) item in column 2, row (Integer B) to Show text and Hide icons
              • Multiboard - Set the display style for (Last created multiboard) item in column 1, row (Integer B) to Show text and Hide icons
              • Multiboard - Set the color for (Last created multiboard) item in column 1, row (Integer B) to (70.00%, 100.00%, 20.00%) with 0.00% transparency
              • Multiboard - Set the color for (Last created multiboard) item in column 2, row (Integer B) to (20.00%, 20.00%, 100.00%) with 0.00% transparency
          • Multiboard - Set the display style for (Last created multiboard) item in column 1, row 1 to Show text and Hide icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 2, row 1 to Show text and Hide icons
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Critical Chance
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row 2 to Critical Damage
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row 3 to Life Steal
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row 4 to Reflect
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row 5 to Attack level
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row 6 to Defence level
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row 7 to Evasion
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row 8 to Chance for block
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row 9 to Vigor
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row 10 to Reserved
          • Set Multiboard_stat[(Integer A)] = (Last created multiboard)
          • Set TempNr = (Number of players in (All players controlled by a User player))
          • Multiboard - Create a multiboard with 6 columns and TempNr rows, titled Statistic
          • For each (Integer B) from 1 to TempNr, do (Actions)
            • Loop - Actions
              • Multiboard - Set the width for (Last created multiboard) item in column 1, row (Integer B) to 10.00% of the total screen width
              • Multiboard - Set the width for (Last created multiboard) item in column 2, row (Integer B) to 10.00% of the total screen width
              • Multiboard - Set the width for (Last created multiboard) item in column 3, row (Integer B) to 3.00% of the total screen width
              • Multiboard - Set the width for (Last created multiboard) item in column 4, row (Integer B) to 3.00% of the total screen width
              • Multiboard - Set the width for (Last created multiboard) item in column 5, row (Integer B) to 3.00% of the total screen width
              • Multiboard - Set the width for (Last created multiboard) item in column 6, row (Integer B) to 3.00% of the total screen width
              • Multiboard - Set the text for (Last created multiboard) item in column 1, row (Integer B) to -
              • Multiboard - Set the text for (Last created multiboard) item in column 2, row (Integer B) to -
              • Multiboard - Set the text for (Last created multiboard) item in column 3, row (Integer B) to 0
              • Multiboard - Set the text for (Last created multiboard) item in column 4, row (Integer B) to 0
              • Multiboard - Set the text for (Last created multiboard) item in column 5, row (Integer B) to 0
              • Multiboard - Set the text for (Last created multiboard) item in column 6, row (Integer B) to 0
              • Multiboard - Set the display style for (Last created multiboard) item in column 2, row (Integer B) to Show text and Hide icons
              • Multiboard - Set the display style for (Last created multiboard) item in column 1, row (Integer B) to Show text and Hide icons
              • Multiboard - Set the color for (Last created multiboard) item in column 1, row (Integer B) to (70.00%, 100.00%, 20.00%) with 0.00% transparency
              • Multiboard - Set the color for (Last created multiboard) item in column 2, row (Integer B) to (20.00%, 20.00%, 100.00%) with 0.00% transparency
          • Set Multiboard_Global = (Last created multiboard)
          • Multiboard - Show all multiboards
          • Custom script: if ( GetLocalPlayer() == Player(GetForLoopIndexA()-1) ) then
          • Multiboard - Show Multiboard_stat[(Integer A)]
          • Multiboard - Show Multiboard[(Integer A)]
          • Custom script: else
          • Multiboard - Hide Multiboard_stat[(Integer A)]
          • Multiboard - Hide Multiboard[(Integer A)]
          • Custom script: endif
          • Trigger - Turn on Stat multiboard update <gen>
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
No, I said to first create all the multiboards, afterwards handle the display. You currently include the display actions inside the same loop, therefore it's in order create - display - create - display - create - display...

There should not be a need to turn on the trigger at the loop's end multiple times either.

Also, as Maker mentioned, only one multiboard can be displayed to a player at a time.

And make sure that the trigger runs completely through at all as there is a limit for operations a trigger is able to execute and those GUI multiboard actions are very wasteful.
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
No, why? Independently from how you trigger it, Wc3 only supports one multiboard to be locally displayed, or none. Either stuff all of the information you want to show in one board or install some method of changing the displayed multiboard.

i hoped could do a individual stat multiboard and 1 for equipment but then i must merge to one :D

1 local and 1 all player multiboard work right?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
The WC3 client supports only 1 dialog, 1 multiboard and 1 leaderboard at any given time. You can ofcourse link these to different objects for different clients in the same game session (multiplayer only) but the fundimentla limit still exists.

If you want more than 1 multiboard you will have to all except 1 at any given time and provide some functionality to switch between them.

Do remember that you only need to update multiboards that are activly visible. This can save considerable processing time.
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
The WC3 client supports only 1 dialog, 1 multiboard and 1 leaderboard at any given time. You can ofcourse link these to different objects for different clients in the same game session (multiplayer only) but the fundimentla limit still exists.

If you want more than 1 multiboard you will have to all except 1 at any given time and provide some functionality to switch between them.

Do remember that you only need to update multiboards that are activly visible. This can save considerable processing time.

ok i think i show only 1 thing and dont modify each time the multiboard just update with few value and i totally changed all BJ to native or what

JASS:
function Trig_Multiboard_creating_Actions takes nothing returns nothing
    local integer a=1
    local integer b=1
    local integer c = 1
    local integer d = 0
    local multiboarditem mbitem = null
    local string t = "pityu"
    local multiboard m = null
    loop
        exitwhen a > 10
        set m = CreateMultiboard()
        call MultiboardSetRowCount(m, 21)
        call MultiboardSetColumnCount(m, 2)
        call MultiboardSetTitleText(m, "Multiboard")
        set udg_Multiboard[a] = m
        call MultiboardSetTitleTextColor(udg_Multiboard[a], 255, 200, 200, 255)
        call MultiboardMinimize(udg_Multiboard[a],true)
   loop
        exitwhen c > 20     
        set mbitem = MultiboardGetItem(udg_Multiboard[a], c, 0)
        call MultiboardSetItemWidth(mbitem, 12/100.0)
        call MultiboardReleaseItem(mbitem)
        set mbitem = MultiboardGetItem(udg_Multiboard[a], c, 1)
        call MultiboardSetItemValue(mbitem, "...........")
        call MultiboardSetItemStyle(mbitem, true, false)
        call MultiboardSetItemWidth(mbitem, 8/100.0)
        call MultiboardReleaseItem(mbitem)
        if (c > 10 ) then
        set mbitem = MultiboardGetItem(udg_Multiboard[a], c, 0)
        call MultiboardSetItemIcon(mbitem, "UI\\Minimap\\MinimapIconCreepLoc2.blp" )
        call MultiboardReleaseItem(mbitem)
        endif
        set c = c + 1
endloop
        set mbitem = MultiboardGetItem(udg_Multiboard[a], 0, 1)
        call MultiboardSetItemIcon(mbitem, "UI\\Feedback\\Resources\\ResourceGold.blp" )
        call MultiboardSetItemWidth(mbitem, 8/100.0)
        call MultiboardSetItemValue(mbitem, "TRIGSTR_014")
        call MultiboardReleaseItem(mbitem)
        set mbitem = MultiboardGetItem(udg_Multiboard[a], 0, 0)
        call MultiboardSetItemWidth(mbitem, 12/100.0)
        call MultiboardSetItemValue(mbitem, "TRIGSTR_013")
        call MultiboardSetItemIcon(mbitem, "UI\\Feedback\\Resources\\ResourceGold.blp" )
        call MultiboardReleaseItem(mbitem)       
        set mbitem = MultiboardGetItem(udg_Multiboard[a], 10, 0)
        call MultiboardSetItemStyle(mbitem, true, true)
        call MultiboardSetItemIcon(mbitem, "UI\\Feedback\\Resources\\ResourceGold.blp" )
        call MultiboardSetItemValueColor(mbitem, 255, 255, 50, 255)
        call MultiboardSetItemValue(mbitem, "TRIGSTR_011")
        call MultiboardReleaseItem(mbitem)
        set mbitem = MultiboardGetItem(udg_Multiboard[a], 10, 1)
        call MultiboardSetItemStyle(mbitem, true, true)
        call MultiboardSetItemIcon(mbitem, "UI\\Feedback\\Resources\\ResourceGold.blp" )
        call MultiboardSetItemValueColor(mbitem, 255, 255, 50, 255)
        call MultiboardSetItemValue(mbitem, "TRIGSTR_012")
        call MultiboardReleaseItem(mbitem)
        set mbitem = MultiboardGetItem(udg_Multiboard[a], 1, 0)
        call MultiboardSetItemWidth(mbitem, 12/100.0)
        call MultiboardSetItemValue(mbitem, "TRIGSTR_015")
        call MultiboardSetItemIcon(mbitem, "ReplaceableTextures\\CommandButtons\\BTNCirclet.blp" )
        call MultiboardReleaseItem(mbitem) 
        set mbitem = MultiboardGetItem(udg_Multiboard[a], 2, 0)
        call MultiboardSetItemWidth(mbitem, 12/100.0)
        call MultiboardSetItemValue(mbitem, "TRIGSTR_016")
        call MultiboardSetItemIcon(mbitem, "ReplaceableTextures\\CommandButtons\\BTNImprovedMoonArmor.blp" )
        call MultiboardReleaseItem(mbitem) 
        set mbitem = MultiboardGetItem(udg_Multiboard[a], 3, 0)
        call MultiboardSetItemWidth(mbitem, 12/100.0)
        call MultiboardSetItemValue(mbitem, "TRIGSTR_017")
        call MultiboardSetItemIcon(mbitem, "ReplaceableTextures\\CommandButtons\\BTNHammer.blp" )
        call MultiboardReleaseItem(mbitem) 
        set mbitem = MultiboardGetItem(udg_Multiboard[a], 4, 0)
        call MultiboardSetItemWidth(mbitem, 12/100.0)
        call MultiboardSetItemValue(mbitem, "TRIGSTR_018")
        call MultiboardSetItemIcon(mbitem, "ReplaceableTextures\\CommandButtons\\BTNHumanArmorUpTwo.blp" )
        call MultiboardReleaseItem(mbitem) 
        set mbitem = MultiboardGetItem(udg_Multiboard[a], 5, 0)
        call MultiboardSetItemWidth(mbitem, 12/100.0)
        call MultiboardSetItemValue(mbitem, "TRIGSTR_019")
        call MultiboardSetItemIcon(mbitem, "ReplaceableTextures\\CommandButtons\\BTNBootsOfSpeed.blp" )
        call MultiboardReleaseItem(mbitem) 
        set mbitem = MultiboardGetItem(udg_Multiboard[a], 6, 0)
        call MultiboardSetItemWidth(mbitem, 12/100.0)
        call MultiboardSetItemValue(mbitem, "TRIGSTR_020")
        call MultiboardSetItemIcon(mbitem, "ReplaceableTextures\\CommandButtons\\BTNRingGreen.blp" )
        call MultiboardReleaseItem(mbitem) 
        set mbitem = MultiboardGetItem(udg_Multiboard[a], 7, 0)
        call MultiboardSetItemWidth(mbitem, 12/100.0)
        call MultiboardSetItemValue(mbitem, "TRIGSTR_021")
        call MultiboardSetItemIcon(mbitem, "ReplaceableTextures\\CommandButtons\\BTNRingGreen.blp" )
        call MultiboardReleaseItem(mbitem) 
        set mbitem = MultiboardGetItem(udg_Multiboard[a], 8, 0)
        call MultiboardSetItemWidth(mbitem, 12/100.0)
        call MultiboardSetItemValue(mbitem, "TRIGSTR_022")
        call MultiboardSetItemIcon(mbitem, "ReplaceableTextures\\CommandButtons\\BTNAmulet.blp" )
        call MultiboardReleaseItem(mbitem) 
        set mbitem = MultiboardGetItem(udg_Multiboard[a], 9, 0)
        call MultiboardSetItemWidth(mbitem, 12/100.0)
        call MultiboardSetItemIcon(mbitem, "ReplaceableTextures\\CommandButtons\\BTNAmulet.blp" )
        call MultiboardSetItemValue(mbitem, "Wings")
        call MultiboardReleaseItem(mbitem) 
        set mbitem = MultiboardGetItem(udg_Multiboard[a], 11, 0)
        call MultiboardSetItemWidth(mbitem, 12/100.0)
        call MultiboardSetItemValue(mbitem, "TRIGSTR_024")
        call MultiboardReleaseItem(mbitem)  
        set mbitem = MultiboardGetItem(udg_Multiboard[a], 12, 0)
        call MultiboardSetItemWidth(mbitem, 12/100.0)
        call MultiboardSetItemValue(mbitem, "TRIGSTR_025")
        call MultiboardReleaseItem(mbitem) 
        set mbitem = MultiboardGetItem(udg_Multiboard[a], 13, 0)
        call MultiboardSetItemWidth(mbitem, 12/100.0)
        call MultiboardSetItemValue(mbitem, "TRIGSTR_026")
        call MultiboardReleaseItem(mbitem) 
        set mbitem = MultiboardGetItem(udg_Multiboard[a], 14, 0)
        call MultiboardSetItemWidth(mbitem, 12/100.0)
        call MultiboardSetItemValue(mbitem, "TRIGSTR_027")
        call MultiboardReleaseItem(mbitem) 
        set mbitem = MultiboardGetItem(udg_Multiboard[a], 15, 0)
        call MultiboardSetItemWidth(mbitem, 12/100.0)
        call MultiboardSetItemValue(mbitem, "TRIGSTR_028")
        call MultiboardReleaseItem(mbitem) 
        set mbitem = MultiboardGetItem(udg_Multiboard[a], 16, 0)
        call MultiboardSetItemWidth(mbitem, 12/100.0)
        call MultiboardSetItemValue(mbitem, "TRIGSTR_029")
        call MultiboardReleaseItem(mbitem) 
        set mbitem = MultiboardGetItem(udg_Multiboard[a], 17, 0)
        call MultiboardSetItemWidth(mbitem, 12/100.0)
        call MultiboardSetItemValue(mbitem, "TRIGSTR_030")
        call MultiboardReleaseItem(mbitem) 
        set mbitem = MultiboardGetItem(udg_Multiboard[a], 18, 0)
        call MultiboardSetItemWidth(mbitem, 12/100.0)
        call MultiboardSetItemValue(mbitem, "TRIGSTR_031")
        call MultiboardReleaseItem(mbitem) 
        set mbitem = MultiboardGetItem(udg_Multiboard[a], 19, 0)
        call MultiboardSetItemWidth(mbitem, 12/100.0)
        call MultiboardSetItemValue(mbitem, "TRIGSTR_032")
        call MultiboardReleaseItem(mbitem) 
        set mbitem = MultiboardGetItem(udg_Multiboard[a], 20, 0)
        call MultiboardSetItemWidth(mbitem, 12/100.0)
        call MultiboardSetItemValue(mbitem, "TRIGSTR_033")
        call MultiboardReleaseItem(mbitem) 
        call TriggerSleepAction( 0.01 )
        set a = a + 1
    endloop
set a = 0
   loop
        exitwhen a > 9    
         if ( GetLocalPlayer() == Player(a) ) then
                call MultiboardDisplay(udg_Multiboard[a+1], true)
                call MultiboardMinimize(udg_Multiboard[a+1],false)
        endif
set a = a + 1
endloop
endfunction

//===========================================================================
function InitTrig_Multiboard_creating takes nothing returns nothing
    set gg_trg_Multiboard_creating = CreateTrigger(  )
    call TriggerRegisterTimerEventSingle( gg_trg_Multiboard_creating, 1.00 )
    call TriggerAddAction( gg_trg_Multiboard_creating, function Trig_Multiboard_creating_Actions )
endfunction
[/hidden]
 
Status
Not open for further replies.
Top