• 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.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

[JASS] Multiboard wont show!

Status
Not open for further replies.
Level 11
Joined
Apr 6, 2008
Messages
760
Why the hell wont the multiboard show?!?!

JASS:
struct Multiboard extends array [9]
multiboard Board

    static method onInit takes nothing returns nothing
        local integer Index = 0

        loop
             exitwhen Index >= 9
          
             set Multiboard[Index].Board = CreateMultiboard()

             //Seting Row and Column things

             if GetLocalPlayer() == Player(Index) then
                 call MultiboardDisplay(Multiboard[Index].Board,true)
             endif

             set Index = Index + 1
        endloop

    endmethod

endstruct
 
I don't know why you make this more complicated than it needs to be...

JASS:
scope mb initializer i
    globals
        private multiboard array mb
    endglobals
    
    private function i takes nothing returns nothing
        local integer index=0
        loop
            exitwhen index>8
            set mb[index]=CreateMultiboard()
            //Setting Row and Column things
            if GetLocalPlayer()==Player(index) then
                call MultiboardDisplay(mb[index],true)
            endif
            set index=index+1
        endloop
    endfunction
endscope
 
Level 4
Joined
Nov 23, 2007
Messages
113
AFAIK, Multiboards can only be displayed after the game has started. Create a timer that fires 0.00 seconds after game start, then call MultiboardDisplay().
 
Level 11
Joined
Apr 6, 2008
Messages
760
Thx for that it will show now but, i have some problems other problem.

The multiboard just shows up empty with eyes even thou i set the style to not show icons, and i wont display the value i gave it either ^^

JASS:
library Multiboard

globals
    public timer Time = CreateTimer()
endglobals

struct Multiboard extends array [9]
multiboard Board
    
    static method onInit takes nothing returns nothing
        call TimerStart(Time,0.0,false,function thistype.AfterInit)
    endmethod
    
    static method AfterInit takes nothing returns nothing
        local integer Index = 0
        local integer Int
        local multiboarditem MItem
        local real x = GetStartLocationX(0)
        local real y = GetStartLocationY(0)
        
        loop
            exitwhen Index >= 1
            
            set PlayerHero[0] = CreateUnit(Player(0),'H008',x,y,0)
            
            set Int = GetHeroInt(PlayerHero[Index],true)
            
            set Multiboard[Index].Board = CreateMultiboard()
            
            call MultiboardSetTitleText(Multiboard[Index].Board,"Board")
            
            call MultiboardSetRowCount(Multiboard[Index].Board,2)
            call MultiboardSetColumnCount(Multiboard[Index].Board,3)
            
            call MultiboardSetItemsWidth(Multiboard[Index].Board,0.10)
            //Row 1
            set MItem = MultiboardGetItem(Multiboard[Index].Board,1,1)
            call MultiboardSetItemStyle(MItem,false,true)
            call MultiboardSetItemIcon(MItem,"ReplaceableTextures\\CommandButtons\\BTNRune of Mending.blp")
            call MultiboardReleaseItem(MItem)
            
            set MItem = MultiboardGetItem(Multiboard[Index].Board,1,2)
            call MultiboardSetItemStyle(MItem,true,false)
            call MultiboardSetItemValue(MItem,"Waterbolt")
            call MultiboardReleaseItem(MItem)
            
            set MItem = MultiboardGetItem(Multiboard[Index].Board,1,3)
            call MultiboardSetItemStyle(MItem,true,false)
            
            call MultiboardSetItemValue(MItem,R2S(Int*WaterBolt_Multiply))
            call MultiboardReleaseItem(MItem)
            //End
            
            if GetLocalPlayer() == Player(Index) then
                call MultiboardDisplay(Multiboard[Index].Board,true)
            endif
            
            
            set Index = Index + 1
        endloop
        
        call TimerStart(Time,0.5,true,function thistype.Update)
        
    endmethod
    
    static method Update takes nothing returns nothing
        local integer Index = 0
        local integer Int
        local multiboarditem MItem
        
        loop
            exitwhen Index >= 1
            
            set Int = GetHeroInt(PlayerHero[Index],true)
            
            //Row 1
            set MItem = MultiboardGetItem(Multiboard[Index].Board,1,3)
            call MultiboardSetItemValue(MItem,R2S(Int*WaterBolt_Multiply))
            call MultiboardReleaseItem(MItem)
            //End
            
            set Index = Index + 1
        endloop
        
    endmethod
        
endstruct

endlibrary

nvm i found the problem, i did like first the first row i did count as 1 when that GUI that do that way it should be 0.
 
Status
Not open for further replies.
Top