| 01-13-2007, 01:22 AM | #1 |
JASS:MultiboardSetItemsStyle JASS:MultiboardSetItemStyle |
| 01-13-2007, 01:23 AM | #2 |
They're the same thing (You typed the same function twice). Also, you mispelled Multiboard in the second one. |
| 01-13-2007, 01:34 AM | #3 |
no, the 1st one has "items" and the 2nd has "item", also another Q: What is a multiboarditem and how do you use it? |
| 01-13-2007, 01:36 AM | #4 |
My guess is that the first one applies to all items on a multiboard while the second only applies to a single item on the multiboard, let me double check. JASS:native MultiboardSetItemsStyle takes multiboard lb, boolean showValues, boolean showIcons returns nothing native MultiboardSetItemStyle takes multiboarditem mbi, boolean showValue, boolean showIcon returns nothing //^ This one is for a single item. |
| 01-13-2007, 01:43 AM | #5 |
well...what is a multiboarditem? |
| 01-13-2007, 02:08 AM | #6 |
It is a reference to a multiboard cell, like locations with points: JASS:native MultiboardGetItem takes multiboard lb, integer row, integer column returns multiboarditem |
| 01-13-2007, 03:08 AM | #7 |
Ty Vex :) would +rep if i could |
| 01-13-2007, 04:16 PM | #8 |
This is my 1st time trying to make a multiboard in jass, and it doesnt really seem to do working right. Heres what this creates: -------------- |---Blank-----| | Players | |---Blank-----| |---Blank-----| |---Blank-----| |---Blank-----| |---Blank-----| ------------- JASS:function Multiboard_ShowName takes nothing returns nothing local player e = GetEnumPlayer() local multiboarditem mi = MultiboardGetItem( udg_Multiboard, GetPlayerId(e) + 2, 1 ) local multiboarditem mi2 = MultiboardGetItem( udg_Multiboard, 1, 1 ) local multiboarditem mi3 = MultiboardGetItem( udg_Multiboard, 1, 2 ) local multiboarditem mi4 = MultiboardGetItem( udg_Multiboard, 1, 3 ) call MultiboardSetItemValue( mi, udg_PlayerNames[GetPlayerId(e) + 1] ) call MultiboardSetItemValue( mi2, "Players" ) call MultiboardSetItemValue( mi3, "K" ) call MultiboardSetItemValue( mi4, "D" ) call MultiboardSetItemWidth( mi2, 7 ) call MultiboardSetItemWidth( mi3, 2 ) call MultiboardSetItemWidth( mi4, 2 ) call MultiboardReleaseItem( mi ) call MultiboardReleaseItem( mi2 ) call MultiboardReleaseItem( mi3 ) call MultiboardReleaseItem( mi4 ) endfunction function Trig_Multiboard_Actions takes nothing returns nothing set udg_Multiboard = CreateMultiboard() call MultiboardSetRowCount( udg_Multiboard, 13 ) call MultiboardSetColumnCount( udg_Multiboard, 3 ) call MultiboardSetTitleText( udg_Multiboard, " v0.99 " ) call MultiboardDisplay( udg_Multiboard, true ) call MultiboardSetItemsStyle( udg_Multiboard, true, false ) call MultiboardSetTitleTextColor( udg_Multiboard, 45, 70, 80, 0 ) call ForForce( udg_Players, function Multiboard_ShowName ) endfunction //=========================================================================== function InitTrig_Multiboard takes nothing returns nothing set gg_trg_Multiboard = CreateTrigger( ) call TriggerRegisterTimerEvent( gg_trg_Multiboard, 5, false ) call TriggerAddAction( gg_trg_Multiboard, function Trig_Multiboard_Actions ) endfunction Whats wrong here? |
| 01-13-2007, 04:57 PM | #9 |
Keep in mind that the row/column count starts with 0 not 1. |
| 01-14-2007, 03:07 AM | #10 |
How come player is the only one that shows though? shouldnt the others show on the same column as player also since i am off by one on all? |
| 01-14-2007, 01:41 PM | #11 |
Sorry, I have no clue what you're talking about?? Perhaps a screenie? |
| 01-14-2007, 07:58 PM | #12 |
ok well now it shows nothing... http://img239.imageshack.us/img239/6...tiboardqr9.jpg JASS:function Multiboard_ShowName takes nothing returns nothing local player e = GetEnumPlayer() local multiboarditem mi = MultiboardGetItem( udg_Multiboard, GetPlayerId(e), 1 ) local multiboarditem mi2 = MultiboardGetItem( udg_Multiboard, 0, 1 ) local multiboarditem mi3 = MultiboardGetItem( udg_Multiboard, 0, 2 ) local multiboarditem mi4 = MultiboardGetItem( udg_Multiboard, 0, 3 ) call MultiboardSetItemValue( mi, udg_PlayerNames[GetPlayerId(e)] ) call MultiboardSetItemValue( mi2, "Players" ) call MultiboardSetItemValue( mi3, "K" ) call MultiboardSetItemValue( mi4, "D" ) call MultiboardSetItemWidth( mi2, 7/100 ) call MultiboardSetItemWidth( mi3, 0.02 ) call MultiboardSetItemWidth( mi4, 0.02 ) call MultiboardReleaseItem( mi ) call MultiboardReleaseItem( mi2 ) call MultiboardReleaseItem( mi3 ) call MultiboardReleaseItem( mi4 ) endfunction function Trig_Multiboard_Actions takes nothing returns nothing set udg_Multiboard = CreateMultiboard() call MultiboardSetRowCount( udg_Multiboard, 13 ) call MultiboardSetColumnCount( udg_Multiboard, 3 ) call MultiboardSetTitleText( udg_Multiboard, " v0.99 " ) call MultiboardDisplay( udg_Multiboard, true ) call MultiboardSetItemsStyle( udg_Multiboard, true, false ) call MultiboardSetTitleTextColor( udg_Multiboard, 45, 70, 80, 0 ) call ForForce( udg_Players, function Multiboard_ShowName ) endfunction This doesnt show either JASS:function End_Game_Victory takes nothing returns nothing call CustomVictoryBJ( GetEnumPlayer(), true, true ) endfunction function End_Game_Loss takes nothing returns nothing call CustomDefeatBJ( GetEnumPlayer(), "You Failed." ) endfunction function End_Game_Tie takes nothing returns nothing call CustomDefeatBJ( GetEnumPlayer(), "Draw." ) endfunction function Trig_Multiboard_Clock_Actions takes nothing returns nothing local force f = GetPlayersAllies(Player(0)) local force ff = GetPlayersAllies(Player(5)) local integer s local integer m local multiboarditem mi = MultiboardGetItem( udg_Multiboard, 13, 1 ) set s = s + 1 if s == 60 then set s = 0 set m = 1 endif call MultiboardSetItemValue( mi, I2S(m) + ":" + I2S(s) ) call MultiboardReleaseItem(mi) if m == 20 then if udg_FlagScore[1] > udg_FlagScore[2] then call ForForce( f, function End_Game_Victory ) call ForForce( ff, function End_Game_Loss ) elseif udg_FlagScore[2] > udg_FlagScore[1] then call ForForce( ff, function End_Game_Victory ) call ForForce( f, function End_Game_Loss ) elseif udg_FlagScore[1] == udg_FlagScore[2] then call ForForce( f, function End_Game_Tie ) call ForForce( ff, function End_Game_Tie ) endif endif call DestroyForce(f) call DestroyForce(ff) set f = null set ff = null endfunction //=========================================================================== function InitTrig_Multiboard_Clock takes nothing returns nothing set gg_trg_Multiboard_Clock = CreateTrigger( ) call DisableTrigger( gg_trg_Multiboard_Clock ) call TriggerRegisterTimerEvent( gg_trg_Multiboard_Clock, 1, true ) call TriggerAddAction( gg_trg_Multiboard_Clock, function Trig_Multiboard_Clock_Actions ) endfunction |
| 01-14-2007, 09:45 PM | #13 |
I'm not very familiar with multiboards, but I did find a problem: JASS:local multiboarditem mi = MultiboardGetItem( udg_Multiboard, GetPlayerId(e), 1 ) local multiboarditem mi2 = MultiboardGetItem( udg_Multiboard, 0, 1 ) For player one, both of these multiboard items will point to the exact same slot on the multiboard. To fix this: JASS:local multiboarditem mi = MultiboardGetItem( udg_Multiboard, GetPlayerId(e)+1, 1 ) You could also have a problem if the multiboard width isn't enough, mess with that too. |
| 01-15-2007, 02:53 AM | #14 |
JASS:call MultiboardSetRowCount( udg_Multiboard, 13 ) Fixed the 1st, but didnt fix it. (btw, how do you highlight?) |
| 01-15-2007, 04:46 AM | #15 | |
Quote:
You can highlight by wrapping the code with @code@. Errors can be highlighted red with #code#. |
