- Joined
- Mar 23, 2008
- Messages
- 942
Ok, I'm trying to fix my multiboard, its the last triggering thing to start my tech beta... But the multiboard don't seem to want be fixed!
When I kill player blue (computer) its all right, the kills and deaths are correctly actualized, but when he kills me all the rows of the killing column get his kill value!
When I kill the BJ return: 3, 1, 2, 5.
3 - Slot in multiboard for Red (correct)
1 - Killing Player +1 (correct, Red)
2 - Dying Player + 1 (correct, Blue)
5 - Slot in multiboard for Blue (correct)
But when he kills me: 0, 4, 1, 3
0 - Slot in multiboard for Blue (WRONG!)
4 - Killing Player + 1 (WRONG!)
1 - Dying Player + 1 (correct)
3 - Slot in multiboard for Red (correct)
So, what is the problem?
When I kill player blue (computer) its all right, the kills and deaths are correctly actualized, but when he kills me all the rows of the killing column get his kill value!
When I kill the BJ return: 3, 1, 2, 5.
3 - Slot in multiboard for Red (correct)
1 - Killing Player +1 (correct, Red)
2 - Dying Player + 1 (correct, Blue)
5 - Slot in multiboard for Blue (correct)
But when he kills me: 0, 4, 1, 3
0 - Slot in multiboard for Blue (WRONG!)
4 - Killing Player + 1 (WRONG!)
1 - Dying Player + 1 (correct)
3 - Slot in multiboard for Red (correct)
JASS:
function Trig_Point_Actions takes nothing returns nothing
call MultiboardSetItemValueBJ( bj_lastCreatedMultiboard, 3, udg_Multiboard_Slot[GetPlayerId(GetOwningPlayer(GetKillingUnit())) + 1], I2S(udg_Points_Kill[GetPlayerId(GetOwningPlayer(GetKillingUnit())) + 1]) )
call BJDebugMsg(I2S(udg_Multiboard_Slot[GetPlayerId(GetOwningPlayer(GetKillingUnit())) + 1]))
call BJDebugMsg(I2S(GetPlayerId(GetOwningPlayer(GetKillingUnit())) + 1))
if IsPlayerAlly(GetOwningPlayer(GetKillingUnit()), Player(0)) then
set udg_Team_Kill[0] = udg_Team_Kill[0] + 1
set udg_Team_Death[1] = udg_Team_Death[1] + 1
if udg_Team_Kill[1] > 0 then
set udg_Team_Kill[1] = udg_Team_Kill[1] - 1
endif
else
set udg_Team_Kill[1] = udg_Team_Kill[1] + 1
set udg_Team_Death[0] = udg_Team_Death[0] + 1
if udg_Team_Kill[0] > 0 then
set udg_Team_Kill[0] = udg_Team_Kill[0] - 1
endif
endif
if udg_Points_Kill[GetPlayerId(GetOwningPlayer(GetDyingUnit())) + 1] > 0 then
set udg_Points_Kill[GetPlayerId(GetOwningPlayer(GetDyingUnit())) + 1] = udg_Points_Kill[GetPlayerId(GetOwningPlayer(GetDyingUnit())) + 1] - 1
endif
call BJDebugMsg(I2S(GetPlayerId(GetOwningPlayer(GetDyingUnit())) + 1))
call BJDebugMsg(I2S(udg_Multiboard_Slot[GetPlayerId(GetOwningPlayer(GetDyingUnit())) + 1]))
call MultiboardSetItemValueBJ( bj_lastCreatedMultiboard, 4, udg_Multiboard_Slot[GetPlayerId(GetOwningPlayer(GetDyingUnit())) + 1], I2S(udg_Points_Death[GetPlayerId(GetOwningPlayer(GetDyingUnit())) + 1]) )
call MultiboardSetItemValueBJ( bj_lastCreatedMultiboard, 3, 2, I2S(udg_Team_Kill[0]) )
call MultiboardSetItemValueBJ( bj_lastCreatedMultiboard, 4, 2, I2S(udg_Team_Death[0]) )
//Team 2
call MultiboardSetItemValueBJ( bj_lastCreatedMultiboard, 3, (3 + udg_Player_Count_team1), I2S(udg_Team_Kill[1]) )
call MultiboardSetItemValueBJ( bj_lastCreatedMultiboard, 4, (3 + udg_Player_Count_team1), I2S(udg_Team_Death[1]) )
call TriggerExecute( gg_trg_End_Point )
endfunction
//===========================================================================
function InitTrig_Point takes nothing returns nothing
set gg_trg_Point = CreateTrigger( )
call TriggerAddAction( gg_trg_Point, function Trig_Point_Actions )
endfunction
So, what is the problem?