| 08-03-2006, 01:59 AM | #1 |
my multiboard works very well, and I'm really satisfied with its functions. Yet, either after cheating "keysersoze" (purely for test purposes of course ), or after one of my cinematics, the heading value "warlord" would turn into a "3". How come that?Here's my code. JASS:function MBoard takes nothing returns nothing local player p = GetEnumPlayer() local multiboard mb = bj_lastCreatedMultiboard set udg_Multiboard_Spots[GetPlayerId(p)+1] = bj_forLoopAIndex call MultiboardSetItemValueBJ( mb, 1, bj_forLoopAIndex , "|c"+GetPlayerColorString(p)+GetPlayerName(p)+"|r" ) call MultiboardSetItemValueBJ( mb, 2, bj_forLoopAIndex , "2" ) call MultiboardSetItemValueBJ( mb, 3, bj_forLoopAIndex , "1" ) set bj_forLoopAIndex = bj_forLoopAIndex + 1 set p = null endfunction function Boards takes nothing returns nothing local integer i = 1 local integer j local force fu = GetPlayersMatching(Condition (function IsUserPlayer)) local multiboard mb local leaderboard lb = CreateLeaderboardBJ( fu, "stats" ) local player en = Player(bj_PLAYER_NEUTRAL_EXTRA) call LeaderboardAddItemBJ( en, lb, "|cff00ff00Body Count|r", R2I(udg_Kills) ) call LeaderboardSetPlayerItemLabelColorBJ( en, lb, 0.00, 100.00, 0.00, 0 ) call LeaderboardSetPlayerItemValueColorBJ( en, lb, 0.00, 100.00, 0.00, 0 ) set en = Player(PLAYER_NEUTRAL_AGGRESSIVE) call LeaderboardAddItemBJ( en, lb, "Total Zones", udg_zonestotal ) call LeaderboardSetPlayerItemLabelColorBJ( en, lb, 100, 100, 100, 0 ) call LeaderboardSetPlayerItemValueColorBJ( en, lb, 100, 100, 100, 0 ) call LeaderboardSetStyleBJ( lb, false, true, true, false ) set j = CountPlayersInForceBJ(udg_Players) + 1 set mb = CreateMultiboardBJ( 3, j, "|cffffcc00Zone Control Evolutions|r" ) call MultiboardSetItemValueBJ( mb, 1, 1, "|cffffcc00Warlord|r" ) call MultiboardSetItemValueBJ( mb, 2, 1, "|cffffcc00Units|r" ) call MultiboardSetItemValueBJ( mb, 3, 1, "|cffffcc00Zones|r" ) loop exitwhen i > j call MultiboardSetItemStyleBJ( mb, 1, i, true, false ) call MultiboardSetItemStyleBJ( mb, 2, i, true, false ) call MultiboardSetItemStyleBJ( mb, 3, i, true, false ) call MultiboardSetItemWidthBJ( mb, 1, i, 8.00 ) call MultiboardSetItemWidthBJ( mb, 2, i, 4.50 ) call MultiboardSetItemWidthBJ( mb, 3, i, 3.50 ) set i = i + 1 endloop set bj_forLoopAIndex = 2 call ForForce( udg_Players, function MBoard ) call MultiboardDisplayBJ( true, mb ) call LeaderboardDisplayBJ( true, lb ) call DestroyTrigger(gg_trg_MBoard) set en = null set fu = null set lb = null set mb = null endfunction |
| 08-03-2006, 02:44 AM | #2 |
It appears your code is fine. The only location you ever have the potential to change the multiboard's value where "warlord" is located is in the first function -- Which, that function to the best of my knowledge appears to be fine. Notably, I could only fathom that having issues if for some reason a player's name was changed to 3. If your problem only occurs when you utilize the "keysersoze" cheat, then I can't fathom the cause. Perhaps it's not worth worrying too much over though as it's a single player only problem? I suppose only that can be determined by you though. |
