Multiboard Help

Nevyll

New Member
Reaction score
1
OK, I know zero vJass, but I'd write something like this:

JASS:
function Action_Create takes nothing returns nothing
    local multiboard M = CreateMultiboard()

    local force f1 = CreateForce()
    local force f2 = CreateForce()
    local integer f1Count = 0
    local integer f2Count = 0

    local integer i = 0

    loop
        exitwhen i > 5  // Loops through the first 6 players. If they match the condition below they will be added to the force f1.

        if ( GetPlayerController(GetFilterPlayer()) == MAP_CONTROL_USER and GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING and IsPlayerAlly(GetFilterPlayer(), Player(0)) ) then
            call ForceAddPlayer( f1, Player(i) )
        endif

        set i = i + 1
    endloop

    if ( i != 6 ) then    // Just to be sure it doesn't bug.
        set i = 6
    endif

    loop
        exitwhen i > 11  // Loops through the last 6 players. If they match the condition below they will be added to the force f2.

        if ( GetPlayerController(GetFilterPlayer()) == MAP_CONTROL_USER and GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING and IsPlayerAlly(GetFilterPlayer(), Player(6)) ) then
            call ForceAddPlayer( f2, Player(i) )
        endif

        set i = i + 1
    endloop

    set f1Count = CountPlayersInForceBJ(f1)
    set f2Count = CountPlayersInForceBJ(f2)

    call MultiboardSetRowCount( M, f1count+ f2count + 6)
    call MultiboardSetColumnCount(M, 5)
    call MultiboardSetTitleText(M , "Multiboard")
    call MultiboardDisplay( M, true)

endfunction


Hope this helps :thup:
 
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