Clan MapZ
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Give Each Player Their OWN Multiboard

2 posters

Go down

Give Each Player Their OWN Multiboard Empty Give Each Player Their OWN Multiboard

Post by TriggerHappy187 Tue Apr 29, 2008 10:36 pm

~~~~~---=Creating Up To 12 Multiboards=---~~~~~


Ok , if you have noticed Warcraft only lets you create "1" Multiboard for all players to see. Well there is a simple way to give ALL Players their own mltiboard displaying their own information. This is still a work in progress


Step 1 : First of all your going to need 1 variable . Name it Multiboard and make the type Multiboard , array [11]

Step 2 : Create a Map intialization trigger that looks like this :

Code:
Untitled Trigger 001
    Events
        Map initialization
    Conditions
    Actions
        Multiboard - Create a multiboard with 2 columns and 1 rows, titled <Empty String>
        For each (Integer A) from 1 to 11, do (Actions)
            Loop - Actions
                Set Multiboard[(Integer A)] = (Last created multiboard)



Step 3 : Show the multiboard to 1 player at a time , to do this create a new trigger and title it "Multiboard" and copy/paste this JASS code into it :


Code:
function Multiboard_Actions takes nothing returns nothing
    local integer c = 0
    call MultiboardDisplay(udg_Multiboard[c],false)
    loop
        exitwhen c > 11
        if GetLocalPlayer() == Player(c) then
          set udg_Multiboard[c] = GetLastCreatedMultiboard()
          call MultiboardDisplay(udg_Multiboard[c],GetLocalPlayer()==Player(c))
        endif
        set c = c + 1
    endloop
endfunction

//===========================================================================
function InitTrig_Multiboard takes nothing returns nothing
    set gg_trg_Multiboard = CreateTrigger(  )
    call TriggerRegisterTimerEventSingle( gg_trg_Multiboard, 1.00 )
    call TriggerAddAction( gg_trg_Multiboard, function Multiboard_Actions )
endfunction


That Trigger Shows the Multiboard To Each Player Individually. And There you go. Although With the trigger plain like this the multiboard shows up like this :

Give Each Player Their OWN Multiboard Multob10

So your going to need to add some more data to it.

Other Functions


Here are some other possibilites to add to your multiboard . just copy then into you multiboard trigger in the loop.

This Changes the multiboards width.
Code:
          call MultiboardSetItemWidthBJ( udg_Multiboard[c], 0, 0, 8.00 )

This changes the title of the multiboard
Code:
          call MultiboardSetTitleText( udg_Multiboard[c], "YOUR TITLE HERE" )

This Changes Text On A Row Or Column
Code:
          call MultiboardSetItemValueBJ( udg_Multiboard[c], 1, 1, "Kills" )










Download Demo Map : http://rapidshare.com/files/111601849/multiboard_demo.w3x.html


Last edited by TriggerHappy187 on Wed Apr 30, 2008 3:55 pm; edited 1 time in total
TriggerHappy187
TriggerHappy187
Admin
Admin

Number of posts : 85
Age : 29
Clan : Mapz
Registration date : 2008-04-09

https://clanmapz.aforumfree.com

Back to top Go down

Give Each Player Their OWN Multiboard Empty Re: Give Each Player Their OWN Multiboard

Post by SpyMaster Wed Apr 30, 2008 3:45 pm

Nice Looks Good.. Didnt Try it but looks good
SpyMaster
SpyMaster
Peon
Peon

Number of posts : 31
Clan : Clan Mapz
Registration date : 2008-04-09

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum