HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Bug: Problem with my multiboard

09-23-2008, 10:29 PM#1
Plater
Hi there people! I have this little problem with my map. It is essential for me to have a multiboard in it, but my trigger is not working (and my world editor is in spanish). Despite i actually read a tutorial of how to do this, it does not work. I am spanish, so I can translate the spanish parts of my trigger for you. Could you help me please? It does not mind if your explanation is in english (its an english forum after all "^^)

- Acontecimientos = Events
- Condiciones = Conditions
- Acciones = Actions
- Tiempo = Time
- Colores_E = (sorry, i dont know the word in english for "variable"; but its what you do with the yellow cross. It is a string tipe of array 8)
- Cantidad_Jugadores = again another "variable". An integer tipe, but without array
- Multiboard_PG = The same as the previous one
- Usuario = User
- Esta Jugando = Is playing
- Tabla múltiple = Multiboard
- Grupo de jugadores = Players Group


Player colour:
Code:
Acontecimientos
    Map initialization
Condiciones
Acciones
    Set Colores_E[1] = |c00ff0000
    Set Colores_E[2] = |c000000ff
    Set Colores_E[3] = |c0000ffff
    Set Colores_E[4] = |c00800080
    Set Colores_E[5] = |c00ffff00
    Set Colores_E[6] = |c00ff8000
    Set Colores_E[7] = |c0000ff00
    Set Colores_E[8] = |c00ff00ff

Create Multiboard

Code:
Acontecimientos
    Tiempo - Elapsed game time is 1.00 seconds
Condiciones
Acciones
    Set Cantidad_Jugadores = (Number of players in (All players matching ((((Matching player) controller) Igual a Usuario) and (((Matching player) slot status) Igual a Está jugando))))
    Tabla múltiple - Create a multiboard with 3 columns and (1 + Cantidad_Jugadores) rows, titled Guerra de los Diose...
    Tabla múltiple - Set the text for (Last created multiboard) item in column 1, row 1 to Nombre Jugador
    Tabla múltiple - Set the text for (Last created multiboard) item in column 2, row 1 to Asesinatos
    Tabla múltiple - Set the text for (Last created multiboard) item in column 3, row 1 to Muertes
    For each (Integer A) from 1 to (1 + Cantidad_Jugadores), do (Actions)
        Bucle: Acciones
            Tabla múltiple - Set the display style for (Last created multiboard) item in column 1, row 1 to Mostrar text and Ocultar icons
            Tabla múltiple - Set the display style for (Last created multiboard) item in column 1, row (Integer A) to Mostrar text and Ocultar icons
            Tabla múltiple - Set the display style for (Last created multiboard) item in column 2, row (Integer A) to Mostrar text and Ocultar icons
            Tabla múltiple - Set the display style for (Last created multiboard) item in column 3, row (Integer A) to Mostrar text and Ocultar icons
            Tabla múltiple - Set the width for (Last created multiboard) item in column 1, row (Integer A) to 2.00% of the total screen width
            Tabla múltiple - Set the width for (Last created multiboard) item in column 2, row (Integer A) to 8.00% of the total screen width
            Tabla múltiple - Set the width for (Last created multiboard) item in column 3, row (Integer A) to 2.00% of the total screen width
            Set Cont = 2
            Grupo de jugadores - Pick every player in (All players matching ((((Matching player) controller) Igual a Usuario) and (((Matching player) slot status) Igual a Está jugando))) and do (Actions)
                Bucle: Acciones
                    Tabla múltiple - Set the text for (Last created multiboard) item in column 2, row Cont to Colores_E[((Player number of (Picked player)) + (Team number of (Picked player)))]
                    Tabla múltiple - Set the text for (Last created multiboard) item in column 2, row Cont to 0
                    Tabla múltiple - Set the icon for (Last created multiboard) item in column 1, row Cont to ReplaceableTextures/CommandButtons/BTNVillagerMan.blp

My multiboard looks like this:





Please. I really need your help. If you dont understand another word, just tell me.

Bye.-
09-25-2008, 11:18 PM#2
Anitarf
I don't understand what the problem is, from what I see the multiboard you get ingame matches the code you posted. I'm just guessing here, but maybe you should increase the Cont variable in your player loop, also you assign two values to column 2 and no value to column 3 in that loop. Also, your Integer A loop doesn't seem necessary, you can easily modify the properties of all your rows and/or columns by using 0 as the row/column number.
09-26-2008, 05:11 PM#3
Plater
Quote:
Originally Posted by Anitarf
I don't understand what the problem is, from what I see the multiboard you get ingame matches the code you posted. I'm just guessing here, but maybe you should increase the Cont variable in your player loop, also you assign two values to column 2 and no value to column 3 in that loop. Also, your Integer A loop doesn't seem necessary, you can easily modify the properties of all your rows and/or columns by using 0 as the row/column number.

I tried what you said, but it doesnt seem to work properly. Could you please tell me the way you would do it? (how you put the triggers so the multiboard looks like dota or Naruto shinobi wars)
09-26-2008, 10:05 PM#4
Anitarf
Sorry, can't help you there, I don't play those maps so I don't know what kind of multiboards they have.
09-27-2008, 02:53 AM#5
Plater
Quote:
Originally Posted by Anitarf
Sorry, can't help you there, I don't play those maps so I don't know what kind of multiboards they have.

I dont want exactly those multiboards... just one with the name of the player, number of deaths and number of kills... sounds simple but for me its pretty hard.

Bye.-
09-27-2008, 03:08 AM#6
Bobo_The_Kodo
Some random code i had lying around

Collapse JASS:
globals
    multiboard Multiboard
    constant integer Team1Offset = 2
    constant integer Team2Offset = 1
    constant integer PlayerOffset = 1
    
    constant string GameName = "Generic AoS"
    constant string Version = "0.05"
     
    constant string Team1Name = "Team 1"
    constant string Team2Name = "Team 2"
     
    integer array PlayerRow 
    
    integer PlayerNumber = 0
endglobals

function MultiboardSetCRColor takes multiboard mb, integer col, integer row, integer red, integer green, integer blue, integer alpha returns nothing
    local multiboarditem MBItem = MultiboardGetItem( Multiboard, row, col )
    call MultiboardSetItemValueColor( MBItem, red, green, blue, alpha )
    call MultiboardReleaseItem( MBItem )
    set MBItem = null
endfunction

function MultiboardSetCRWidth takes multiboard mb, integer col, integer row, real width returns nothing
    local multiboarditem MBItem = MultiboardGetItem( Multiboard, row, col )
    call MultiboardSetItemWidth( MBItem, width )
    call MultiboardReleaseItem( MBItem )
    set MBItem = null
endfunction

function MultiboardSetCRText takes multiboard mb, integer col, integer row, string text returns nothing
    local multiboarditem MBItem = MultiboardGetItem( Multiboard, row, col )
    call MultiboardSetItemValue( MBItem, text )
    call MultiboardReleaseItem( MBItem )
    set MBItem = null
endfunction

function MultiboardSetCRStyle takes multiboard mb, integer col, integer row, boolean showText, boolean showIcon returns nothing
    local multiboarditem MBItem = MultiboardGetItem( Multiboard, row, col )
    call MultiboardSetItemStyle( MBItem, showText, showIcon )
    call MultiboardReleaseItem( MBItem )
    set MBItem = null
endfunction

function MultiboardSetCRIcon takes multiboard mb, integer col, integer row, string iconPath returns nothing
    local multiboarditem MBItem = MultiboardGetItem( Multiboard, row, col )
    call MultiboardSetItemIcon( MBItem, iconPath )
    call MultiboardReleaseItem( MBItem )
    set MBItem = null
endfunction

function MultiboardActions takes nothing returns nothing 
    local integer i = 0
    local integer i2 = 0
    set Multiboard = CreateMultiboard()
    call MultiboardSetTitleText( Multiboard, GameName + " v" + Version )
    call MultiboardDisplay( Multiboard, true )
    
    call MultiboardSetRowCount( Multiboard, 5 )
    call MultiboardSetColumnCount( Multiboard, 3 + PlayerNumber )
    
    call MultiboardMinimize( Multiboard, true )
    call MultiboardSetCRText( Multiboard, 0, 0, "     Player" )
    call MultiboardSetCRText( Multiboard, 1, 0, "Dead?" )
    call MultiboardSetCRColor( Multiboard, 1, 0, 255, 255, 0, 255 )
    call MultiboardSetCRText( Multiboard, 2, 0, "Kills" )
    call MultiboardSetCRColor( Multiboard, 2, 0, 255, 0, 0, 255 )
    call MultiboardSetCRText( Multiboard, 3, 0, "Deaths" )
    call MultiboardSetCRColor( Multiboard, 3, 0, 0, 0, 255, 255 )
    call MultiboardSetCRText( Multiboard, 4, 0, "Assists" )
    call MultiboardSetCRColor( Multiboard, 4, 0, 128, 128, 128, 190 )
    
    //SpellCaster Multiboard Section
        set i = MultiboardGetRowCount( Multiboard ) - Team1Offset
        call MultiboardSetCRText( Multiboard, 0, i, Team1Name )
        set i = 0        
    //End
    //
    //Brute Multiboard Section
        set i = MultiboardGetRowCount( Multiboard ) - Team2Offset
        call MultiboardSetCRText( Multiboard, 0, i, Team2Name )
        set i = 0
    //End
    loop
        //Set the colour of all Values in first Row to Goldish
          //call MultiboardSetCRColor( Multiboard, i, 0, 255, 204, 51, 255 ) //I don't like the gold!
        //End
        
        //Hide all icons
        loop
            call MultiboardSetCRStyle( Multiboard, i, i2, true, false )
            set i2 = i2 + 1
            exitwhen i2 > MultiboardGetRowCount( Multiboard )
        endloop
        set i2 = 0
        //End
        set i = i + 1
        exitwhen i > MultiboardGetColumnCount( Multiboard )
    endloop
    set i = 0
    //Loop through all Rows
    loop
        //Set Column Sizes
        call MultiboardSetCRWidth( Multiboard, 0, i, .12 )
        call MultiboardSetCRWidth( Multiboard, 1, i, .04 )
        call MultiboardSetCRWidth( Multiboard, 2, i, .04 )
        call MultiboardSetCRWidth( Multiboard, 3, i, .0525 )
        call MultiboardSetCRWidth( Multiboard, 4, i, .06 )
        //End
        //And Columns
        loop
            set i2 = i2 + 1
            exitwhen i2 > MultiboardGetRowCount( Multiboard )
        endloop
        //End
        //Set Player Names
        if i < PlayerNumber then
            //Dead/Kills/Deaths/Assists Colors
                call MultiboardSetCRColor( Multiboard, 1, i + PlayerOffset, 255, 255, 0, 255 )
                call MultiboardSetCRColor( Multiboard, 2, i + PlayerOffset, 255, 0, 0, 255 )
                call MultiboardSetCRColor( Multiboard, 3, i + PlayerOffset, 0, 0, 255, 255 )
                call MultiboardSetCRColor( Multiboard, 4, i + PlayerOffset, 128, 128, 128, 190 )
            //End
            set PlayerRow[i] = i + PlayerOffset
            call MultiboardSetCRText( Multiboard, 0, i + PlayerOffset, GetPlayerNameColored( Player( i ) ) )
            call MultiboardSetCRText( Multiboard, 2, i + PlayerOffset, "0" )
            call MultiboardSetCRText( Multiboard, 3, i + PlayerOffset, "0" )
            call MultiboardSetCRText( Multiboard, 4, i + PlayerOffset, "0" )
            call MultiboardSetCRStyle( Multiboard, 0, i + PlayerOffset, true, true )
            call MultiboardSetCRIcon( Multiboard, 0, i + PlayerOffset, "ReplaceableTextures\\CommandButtons\\BTNSelectHeroOn.blp" )
        endif
        //End
        set i = i + 1
        exitwhen i > MultiboardGetRowCount( Multiboard )
    endloop
    set i = 0
    //End
endfunction

//===========================================================================
 function Init takes nothing returns nothing
    local trigger t = CreateTrigger()
    local integer i = 0
    loop
        exitwhen i > 11
        if GetPlayerSlotState( Player( i ) ) == PLAYER_SLOT_STATE_PLAYING then
            set PlayerNumber = PlayerNumber + 1
        endif
        set i = i + 1
    endloop
    call TriggerRegisterTimerEvent( t, 0.10, false )
    call TriggerAddAction( t, function MultiboardActions )
endfunction
09-27-2008, 07:49 PM#7
Plater
Quote:
Originally Posted by Bobo_The_Kodo
Some random code i had lying around

Collapse JASS:
globals
    multiboard Multiboard
    constant integer Team1Offset = 2
    constant integer Team2Offset = 1
    constant integer PlayerOffset = 1
    
    constant string GameName = "Generic AoS"
    constant string Version = "0.05"
     
    constant string Team1Name = "Team 1"
    constant string Team2Name = "Team 2"
     
    integer array PlayerRow 
    
    integer PlayerNumber
endglobals

function MultiboardSetCRColor takes multiboard mb, integer col, integer row, integer red, integer green, integer blue, integer alpha returns nothing
    local multiboarditem MBItem = MultiboardGetItem( Multiboard, row, col )
    call MultiboardSetItemValueColor( MBItem, red, green, blue, alpha )
    call MultiboardReleaseItem( MBItem )
    set MBItem = null
endfunction

function MultiboardSetCRWidth takes multiboard mb, integer col, integer row, real width returns nothing
    local multiboarditem MBItem = MultiboardGetItem( Multiboard, row, col )
    call MultiboardSetItemWidth( MBItem, width )
    call MultiboardReleaseItem( MBItem )
    set MBItem = null
endfunction

function MultiboardSetCRText takes multiboard mb, integer col, integer row, string text returns nothing
    local multiboarditem MBItem = MultiboardGetItem( Multiboard, row, col )
    call MultiboardSetItemValue( MBItem, text )
    call MultiboardReleaseItem( MBItem )
    set MBItem = null
endfunction

function MultiboardSetCRStyle takes multiboard mb, integer col, integer row, boolean showText, boolean showIcon returns nothing
    local multiboarditem MBItem = MultiboardGetItem( Multiboard, row, col )
    call MultiboardSetItemStyle( MBItem, showText, showIcon )
    call MultiboardReleaseItem( MBItem )
    set MBItem = null
endfunction

function MultiboardSetCRIcon takes multiboard mb, integer col, integer row, string iconPath returns nothing
    local multiboarditem MBItem = MultiboardGetItem( Multiboard, row, col )
    call MultiboardSetItemIcon( MBItem, iconPath )
    call MultiboardReleaseItem( MBItem )
    set MBItem = null
endfunction

 function Actions takes nothing returns nothing 
    local integer i = 0
    local integer i2 = 0
    set Multiboard = CreateMultiboard()
    call MultiboardSetTitleText( Multiboard, GameName + " v" + Version )
    call MultiboardDisplay( Multiboard, true )
    
    call MultiboardSetRowCount( Multiboard, 5 )
    call MultiboardSetColumnCount( Multiboard, 3 + PlayerNumber )
    
    call MultiboardMinimize( Multiboard, true )
    call MultiboardSetCRText( Multiboard, 0, 0, "     Player" )
    call MultiboardSetCRText( Multiboard, 1, 0, "Dead?" )
    call MultiboardSetCRColor( Multiboard, 1, 0, 255, 255, 0, 255 )
    call MultiboardSetCRText( Multiboard, 2, 0, "Kills" )
    call MultiboardSetCRColor( Multiboard, 2, 0, 255, 0, 0, 255 )
    call MultiboardSetCRText( Multiboard, 3, 0, "Deaths" )
    call MultiboardSetCRColor( Multiboard, 3, 0, 0, 0, 255, 255 )
    call MultiboardSetCRText( Multiboard, 4, 0, "Assists" )
    call MultiboardSetCRColor( Multiboard, 4, 0, 128, 128, 128, 190 )
    
    //SpellCaster Multiboard Section
        set i = MultiboardGetRowCount( Multiboard ) - Team1Offset
        call MultiboardSetCRText( Multiboard, 0, i, Team1Name )
        set i = 0        
    //End
    //
    //Brute Multiboard Section
        set i = MultiboardGetRowCount( Multiboard ) - Team2Offset
        call MultiboardSetCRText( Multiboard, 0, i, Team2Name )
        set i = 0
    //End
    loop
        //Set the colour of all Values in first Row to Goldish
          //call MultiboardSetCRColor( Multiboard, i, 0, 255, 204, 51, 255 ) //I don't like the gold!
        //End
        
        //Hide all icons
        loop
            call MultiboardSetCRStyle( Multiboard, i, i2, true, false )
            set i2 = i2 + 1
            exitwhen i2 > MultiboardGetRowCount( Multiboard )
        endloop
        set i2 = 0
        //End
        set i = i + 1
        exitwhen i > MultiboardGetColumnCount( Multiboard )
    endloop
    set i = 0
    //Loop through all Rows
    loop
        //Set Column Sizes
        call MultiboardSetCRWidth( Multiboard, 0, i, .12 )
        call MultiboardSetCRWidth( Multiboard, 1, i, .04 )
        call MultiboardSetCRWidth( Multiboard, 2, i, .04 )
        call MultiboardSetCRWidth( Multiboard, 3, i, .0525 )
        call MultiboardSetCRWidth( Multiboard, 4, i, .06 )
        //End
        //And Columns
        loop
            set i2 = i2 + 1
            exitwhen i2 > MultiboardGetRowCount( Multiboard )
        endloop
        //End
        //Set Player Names
        if i < PlayerNumber then
            //Dead/Kills/Deaths/Assists Colors
                call MultiboardSetCRColor( Multiboard, 1, i + PlayerOffset, 255, 255, 0, 255 )
                call MultiboardSetCRColor( Multiboard, 2, i + PlayerOffset, 255, 0, 0, 255 )
                call MultiboardSetCRColor( Multiboard, 3, i + PlayerOffset, 0, 0, 255, 255 )
                call MultiboardSetCRColor( Multiboard, 4, i + PlayerOffset, 128, 128, 128, 190 )
            //End
            set PlayerRow[i] = i + PlayerOffset
            call MultiboardSetCRText( Multiboard, 0, i + PlayerOffset, GetPlayerNameColored( Player( i ) ) )
            call MultiboardSetCRText( Multiboard, 2, i + PlayerOffset, "0" )
            call MultiboardSetCRText( Multiboard, 3, i + PlayerOffset, "0" )
            call MultiboardSetCRText( Multiboard, 4, i + PlayerOffset, "0" )
            call MultiboardSetCRStyle( Multiboard, 0, i + PlayerOffset, true, true )
            call MultiboardSetCRIcon( Multiboard, 0, i + PlayerOffset, "ReplaceableTextures\\CommandButtons\\BTNSelectHeroOn.blp" )
        endif
        //End
        set i = i + 1
        exitwhen i > MultiboardGetRowCount( Multiboard )
    endloop
    set i = 0
    //End
endfunction

//===========================================================================
 function Init takes nothing returns nothing
    local trigger t = CreateTrigger()
    local integer i = 0
    loop
        exitwhen i > 11
        if GetPlayerSlotState( Player( i ) ) == PLAYER_SLOT_STATE_PLAYING then
            set PlayerNum = PlayerNum + 1
        endif
        set i = i + 1
    endloop
    call TriggerRegisterTimerEvent( t, 0.10, false )
    call TriggerAddAction( t, function Actions )
endfunction

Thank you so much. Just one thing: How do I put this JASS code in my map?
09-28-2008, 03:42 PM#8
Bobo_The_Kodo
Press new trigger

Then Edit -> Convert to custom text

and paste it in

(change the name of the last function to InitTrig_(Your trigger name)
09-28-2008, 04:05 PM#9
moo^moo^cow
to add kills and deaths you need to add another 2 columns. from what i can see you used the sample multiboard that was provided on world-editor-tutorials.thehelper.net/multiboard.php. its a good start but you also need to play around with the values. like increase the width value of each columnxrow.

as a side note the reason why your table doesnt look like the dota multiboard is because youve set the board to only display human players who are actually playing. if you look at your variables Player_Count and List theyre integer variables that make a new row for every human player in the game. if you want to add in the computer forces you need to add a coupla additional rows.
09-28-2008, 05:57 PM#10
Plater
Quote:
Originally Posted by moo^moo^cow
to add kills and deaths you need to add another 2 columns. from what i can see you used the sample multiboard that was provided on world-editor-tutorials.thehelper.net/multiboard.php. its a good start but you also need to play around with the values. like increase the width value of each columnxrow.

as a side note the reason why your table doesnt look like the dota multiboard is because youve set the board to only display human players who are actually playing. if you look at your variables Player_Count and List theyre integer variables that make a new row for every human player in the game. if you want to add in the computer forces you need to add a coupla additional rows.

Well, thanks for your info (the web page you said... In fact I have never seen it before :P, and it was very useful to me), my multiboard is quite a success. Just one little thing: In the first row it does not say "Player Name" and "Kills". It repeats the same that it is on the lower row. I tried to fix it but that bug still remains. Its not the big deal, but I would like to have a perfect multiboard.

This is the way it looks right now:

And this is my actual trigger:

Trigger:
Create Multiboard Copiar
Collapse Events
Time - Elapsed game time is 1.00 seconds
Conditions
Collapse Actions
Set Cantidad_Jugadores = (Number of players in (All players matching ((((Matching player) controller) Igual a Usuario) and (((Matching player) slot status) Igual a Está jugando))))
Multiboard - Create a multiboard with 3 columns and (1 + Cantidad_Jugadores) rows, titled Guerra de los Dioses
Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to Nombre Jugador
Multiboard - Set the text for (Last created multiboard) item in column 3, row 1 to Muertes
Collapse For each (Integer A) from 1 to (1 + Cantidad_Jugadores), do (Actions)
Collapse Loop: Actions
Multiboard - Set the display style for (Last created multiboard) item in column 1, row 1 to Mostrar text and Ocultar icons
Multiboard - Set the display style for (Last created multiboard) item in column 1, row (Integer A) to Mostrar text and Mostrar icons
Multiboard - Set the display style for (Last created multiboard) item in column 2, row (Integer A) to Mostrar text and Ocultar icons
Multiboard - Set the display style for (Last created multiboard) item in column 3, row (Integer A) to Mostrar text and Ocultar icons
Multiboard - Set the width for (Last created multiboard) item in column 1, row (Integer A) to 2.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 width for (Last created multiboard) item in column 3, row (Integer A) to 2.00% of the total screen width
Set Cont = 2
Collapse Players Group - Pick every player in (All players matching ((((Matching player) slot status) Igual a Está jugando) and (((Matching player) controller) Igual a Usuario))) and do (Actions)
Collapse Loop: Actions
Set Multiboard_Spots[(Player number of (Picked player))] = Cont
Multiboard - Set the icon for (Last created multiboard) item in column 1, row List to ReplaceableTextures\CommandButtons\BTNVillagerMan.blp
Multiboard - Set the text for (Last created multiboard) item in column 2, row List to (Player_Colors[(Player number of (Picked player))] + ((Name of (Picked player)) + |r))
Multiboard - Set the text for (Last created multiboard) item in column 3, row List to 0
Set Cont = (Cont + 1)
Multiboard - Mostrar (Last created multiboard)

JASS view:

Collapse JASS:
 function Trig_Create_Multiboard_Copiar_Func001002001001001 takes nothing returns boolean
    return ( GetPlayerController(GetFilterPlayer()) == MAP_CONTROL_USER )
endfunction

function Trig_Create_Multiboard_Copiar_Func001002001001002 takes nothing returns boolean
    return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction

function Trig_Create_Multiboard_Copiar_Func001002001001 takes nothing returns boolean
    return GetBooleanAnd( Trig_Create_Multiboard_Copiar_Func001002001001001(), Trig_Create_Multiboard_Copiar_Func001002001001002() )
endfunction

function Trig_Create_Multiboard_Copiar_Func008001001001 takes nothing returns boolean
    return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction

function Trig_Create_Multiboard_Copiar_Func008001001002 takes nothing returns boolean
    return ( GetPlayerController(GetFilterPlayer()) == MAP_CONTROL_USER )
endfunction

function Trig_Create_Multiboard_Copiar_Func008001001 takes nothing returns boolean
    return GetBooleanAnd( Trig_Create_Multiboard_Copiar_Func008001001001(), Trig_Create_Multiboard_Copiar_Func008001001002() )
endfunction

function Trig_Create_Multiboard_Copiar_Func008A takes nothing returns nothing
    set udg_Multiboard_Spots[GetConvertedPlayerId(GetEnumPlayer())] = udg_Cont
    call MultiboardSetItemIconBJ( GetLastCreatedMultiboard(), 1, udg_List, "ReplaceableTextures\\CommandButtons\\BTNVillagerMan.blp" )
    call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, udg_List, ( udg_Player_Colors[GetConvertedPlayerId(GetEnumPlayer())] + ( GetPlayerName(GetEnumPlayer()) + "|r" ) ) )
    call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, udg_List, "TRIGSTR_1109" )
    set udg_Cont = ( udg_Cont + 1 )
endfunction

function Trig_Create_Multiboard_Copiar_Actions takes nothing returns nothing
    set udg_Cantidad_Jugadores = CountPlayersInForceBJ(GetPlayersMatching(Condition(function Trig_Create_Multiboard_Copiar_Func001002001001)))
    call CreateMultiboardBJ( 3, ( 1 + udg_Cantidad_Jugadores ), "TRIGSTR_1106" )
    call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, 1, "TRIGSTR_1107" )
    call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, 1, "TRIGSTR_1108" )
    set bj_forLoopAIndex = 1
    set bj_forLoopAIndexEnd = ( 1 + udg_Cantidad_Jugadores )
    loop
        exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
        call MultiboardSetItemStyleBJ( GetLastCreatedMultiboard(), 1, 1, true, false )
        call MultiboardSetItemStyleBJ( GetLastCreatedMultiboard(), 1, GetForLoopIndexA(), true, true )
        call MultiboardSetItemStyleBJ( GetLastCreatedMultiboard(), 2, GetForLoopIndexA(), true, false )
        call MultiboardSetItemStyleBJ( GetLastCreatedMultiboard(), 3, GetForLoopIndexA(), true, false )
        call MultiboardSetItemWidthBJ( GetLastCreatedMultiboard(), 1, GetForLoopIndexA(), 2.00 )
        call MultiboardSetItemWidthBJ( GetLastCreatedMultiboard(), 2, GetForLoopIndexA(), 8.00 )
        call MultiboardSetItemWidthBJ( GetLastCreatedMultiboard(), 3, GetForLoopIndexA(), 2.00 )
        set bj_forLoopAIndex = bj_forLoopAIndex + 1
    endloop
    set udg_Cont = 2
    call ForForce( GetPlayersMatching(Condition(function Trig_Create_Multiboard_Copiar_Func008001001)), function Trig_Create_Multiboard_Copiar_Func008A )
    call MultiboardDisplayBJ( true, GetLastCreatedMultiboard() )
endfunction

//===========================================================================
function InitTrig_Create_Multiboard_Copiar takes nothing returns nothing
    set gg_trg_Create_Multiboard_Copiar = CreateTrigger(  )
    call TriggerRegisterTimerEventSingle( gg_trg_Create_Multiboard_Copiar, 1.00 )
    call TriggerAddAction( gg_trg_Create_Multiboard_Copiar, function Trig_Create_Multiboard_Copiar_Actions )
endfunction


Bye.-

PD: I also want to thank Bobo_The_Kodo for his JASS trigger I couldnt install because I am too... dummy "^^

PD2: I did my best trying to translate the trigger from spanish to english, so you can understand it fully.
09-28-2008, 07:26 PM#11
Anitarf
In the player group loop, you're using the wrong variable for the multiboard row, you're using List instead of Cont. I assume the value of List is 0 at the time so it sets the same value for all rows.
09-28-2008, 08:00 PM#12
Plater
Quote:
Originally Posted by Anitarf
In the player group loop, you're using the wrong variable for the multiboard row, you're using List instead of Cont. I assume the value of List is 0 at the time so it sets the same value for all rows.

That was exactly the mistake. Now the multiboard works properly. Thank you.

And thank you all people for helping me with the trigger.

Bye.-