- Joined
- Oct 24, 2012
- Messages
- 6,545
im having a problem w this
here is the second part were the arrays r refferenced
the problem is tht the boss killd message gets displayed but after tht it stops any reason y ? thanks for any help
JASS:
function Trig_Red_Kills_Counter_Conditions takes nothing returns boolean
if ( GetOwningPlayer(GetKillingUnitBJ()) == Player(0) ) then
return true
endif
if ( GetOwningPlayer(GetDyingUnit()) == Player(11) ) then
return true
endif
return false
endfunction
function Trig_Red_Kills_Counter_Func000C takes nothing returns boolean
if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[1] ) ) then
return true
endif
if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[2] ) ) then
return true
endif
if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[3] ) ) then
return true
endif
if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[4] ) ) then
return true
endif
if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[5] ) ) then
return true
endif
if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[6] ) ) then
return true
endif
if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[7] ) ) then
return true
endif
if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[8] ) ) then
return true
endif
if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[9] ) ) then
return true
endif
if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[10] ) ) then
return true
endif
if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[11] ) ) then
return true
endif
if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[12] ) ) then
return true
endif
if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[13] ) ) then
return true
endif
if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[14] ) ) then
return true
endif
if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[15] ) ) then
return true
endif
if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[16] ) ) then
return true
endif
if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[17] ) ) then
return true
endif
if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[18] ) ) then
return true
endif
if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[19] ) ) then
return true
endif
if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[20] ) ) then
return true
endif
if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[21] ) ) then
return true
endif
if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[22] ) ) then
return true
endif
if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[23] ) ) then
return true
endif
if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[24] ) ) then
return true
endif
if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[25] ) ) then
return true
endif
return false
endfunction
function Trig_Red_Kills_Counter_Actions takes nothing returns nothing
local integer IXY_P1 = 0
if ( Trig_Red_Kills_Counter_Func000C() ) then
set udg_Kills_Player[1] = ( udg_Kills_Player[1] + 1 )
call MultiboardSetItemValueBJ( udg_MultiBoard_Game_Scores, 2, 3, I2S(udg_Kills_Player[1]) )
set udg_EnemiesAlive_Player[1] = ( udg_EnemiesAlive_Player[1] - 1 )
call MultiboardSetItemValueBJ( udg_MultiBoard_Game_Scores, 2, 6, I2S(udg_EnemiesAlive_Player[1]) )
set udg_EnemiesAlive_Counter_Player[1] = ( udg_EnemiesAlive_Counter_Player[1] - 1 )
if ( ( udg_EnemiesAlive_Counter_Player[1] == 0 ) ) then
call EnableTrigger( gg_trg_Unit_Spawn_Red_all_Lvls )
if ( ( udg_Boss_Add_Mana_Boolean_Player[1] == true ) ) then
set udg_Boss_Add_Mana_Boolean_Player[1] = false
set udg_Boss_Add_Mana_Player[1] = GetUnitStateSwap(UNIT_STATE_MANA, gg_unit_h04M_0004)
call SetUnitManaBJ( gg_unit_h04M_0004, ( udg_Boss_Add_Mana_Player[1] + 10.00 ) )
call DisplayTextToForce( GetPlayersAll(), ( "Player 1 recieves 10 mana for boss summoner" ) )
endif
if ( ( udg_Damage_Boss_Round_Count_Player[1] == udg_Damage_Boss_Spawn_Count_Player[1] ) ) then
set udg_Damage_Boss_Round_Count_Player[1] = 0
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_7641" )
call TriggerExecute( gg_trg_Run_Damage_Test_Red )
endif
endif
endif
if ( ( GetTriggerUnit() == udg_Boss_Unit_Player[1] ) ) then
set udg_Boss_Total_Kills_Player[1] = ( udg_Boss_Total_Kills_Player[1] + 1 )
call MultiboardSetItemValueBJ( udg_MultiBoard_Game_Scores, 2, 8, I2S(udg_Boss_Total_Kills_Player[1]) )
call DisplayTextToForce(GetPlayersAll(), "boss killed")
set IXY_P1 = IXY_P1 + 1
call DisplayTextToForce(GetPlayersAll(), I2S(IXY_P1))
call ReviveHero(udg_Boss_Unit_Player[1], Boss_Spawn_RedX[IXY_P1], Boss_Spawn_RedY[IXY_P1], true)
call DisplayTextToForce(GetPlayersAll(), "boss revive")
call SetUnitOwner( udg_Boss_Unit_Player[1], Player(0), true )
call PauseUnit( udg_Boss_Unit_Player[1], true )
call EnableTrigger( gg_trg_Boss_Spawns_Red )
endif
set udg_Income_Player[1] = ( R2I(( I2R(udg_Kills_Player[1]) / udg_Income_Percentage_Player[1] )) + ( udg_Boss_Total_Kills_Player[1] * 10 ) )
call MultiboardSetItemValueBJ( udg_MultiBoard_Game_Scores, 2, 5, I2S(udg_Income_Player[1]) )
endfunction
//===========================================================================
function InitTrig_Red_Kills_Counter takes nothing returns nothing
set gg_trg_Red_Kills_Counter = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Red_Kills_Counter, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Red_Kills_Counter, Condition( function Trig_Red_Kills_Counter_Conditions ) )
call TriggerAddAction( gg_trg_Red_Kills_Counter, function Trig_Red_Kills_Counter_Actions )
endfunction
here is the second part were the arrays r refferenced
JASS:
globals
real array Boss_Spawn_RedX
real array Boss_Spawn_RedY
integer array Unit_Runner_Spawn
endglobals
function Trig_Unit_Spawns_Actions takes nothing returns nothing
call InitHashtableBJ( )
set udg_Hashtable_Spells = GetLastCreatedHashtableBJ()
//SET THE X VALUES FOR PLAYER 1
set Boss_Spawn_RedX[1] = GetRectCenterX(gg_rct_Player_1_Boss_Spawn_1)
set Boss_Spawn_RedX[2] = GetRectCenterX(gg_rct_Player_1_Boss_Spawn_2)
set Boss_Spawn_RedX[3] = GetRectCenterX(gg_rct_Player_1_Boss_Spawn_3)
set Boss_Spawn_RedX[4] = GetRectCenterX(gg_rct_Player_1_Boss_Spawn_4)
set Boss_Spawn_RedX[5] = GetRectCenterX(gg_rct_Player_1_Boss_Spawn_5)
set Boss_Spawn_RedX[6] = GetRectCenterX(gg_rct_Player_1_Boss_Spawn_6)
set Boss_Spawn_RedX[7] = GetRectCenterX(gg_rct_Player_1_Boss_Spawn_7)
set Boss_Spawn_RedX[8] = GetRectCenterX(gg_rct_Player_1_Boss_Spawn_8)
set Boss_Spawn_RedX[9] = GetRectCenterX(gg_rct_Player_1_Boss_Spawn_9)
set Boss_Spawn_RedX[10] = GetRectCenterX(gg_rct_Player_1_Boss_Spawn_10)
set Boss_Spawn_RedX[11] = GetRectCenterX(gg_rct_Player_1_Boss_Spawn_11)
set Boss_Spawn_RedX[12] = GetRectCenterX(gg_rct_Player_1_Boss_Spawn_12)
set Boss_Spawn_RedX[13] = GetRectCenterX(gg_rct_Player_1_Boss_Spawn_13)
set Boss_Spawn_RedX[14] = GetRectCenterX(gg_rct_Player_1_Boss_Spawn_14)
set Boss_Spawn_RedX[15] = GetRectCenterX(gg_rct_Player_1_Boss_Spawn_15)
set Boss_Spawn_RedX[16] = GetRectCenterX(gg_rct_Player_1_Boss_Spawn_16)
set Boss_Spawn_RedX[17] = GetRectCenterX(gg_rct_Player_1_Boss_Spawn_17)
set Boss_Spawn_RedX[18] = GetRectCenterX(gg_rct_Player_1_Boss_Spawn_18)
//SET THE Y VALUES FOR PLAYER 1
set Boss_Spawn_RedX[1] = GetRectCenterY(gg_rct_Player_1_Boss_Spawn_1)
set Boss_Spawn_RedY[2] = GetRectCenterY(gg_rct_Player_1_Boss_Spawn_2)
set Boss_Spawn_RedY[3] = GetRectCenterY(gg_rct_Player_1_Boss_Spawn_3)
set Boss_Spawn_RedY[4] = GetRectCenterY(gg_rct_Player_1_Boss_Spawn_4)
set Boss_Spawn_RedY[5] = GetRectCenterY(gg_rct_Player_1_Boss_Spawn_5)
set Boss_Spawn_RedY[6] = GetRectCenterY(gg_rct_Player_1_Boss_Spawn_6)
set Boss_Spawn_RedY[7] = GetRectCenterY(gg_rct_Player_1_Boss_Spawn_7)
set Boss_Spawn_RedY[8] = GetRectCenterY(gg_rct_Player_1_Boss_Spawn_8)
set Boss_Spawn_RedY[9] = GetRectCenterY(gg_rct_Player_1_Boss_Spawn_9)
set Boss_Spawn_RedY[10] = GetRectCenterY(gg_rct_Player_1_Boss_Spawn_10)
set Boss_Spawn_RedY[11] = GetRectCenterY(gg_rct_Player_1_Boss_Spawn_11)
set Boss_Spawn_RedY[12] = GetRectCenterY(gg_rct_Player_1_Boss_Spawn_12)
set Boss_Spawn_RedY[13] = GetRectCenterY(gg_rct_Player_1_Boss_Spawn_13)
set Boss_Spawn_RedY[14] = GetRectCenterY(gg_rct_Player_1_Boss_Spawn_14)
set Boss_Spawn_RedY[15] = GetRectCenterY(gg_rct_Player_1_Boss_Spawn_15)
set Boss_Spawn_RedY[16] = GetRectCenterY(gg_rct_Player_1_Boss_Spawn_16)
set Boss_Spawn_RedY[17] = GetRectCenterY(gg_rct_Player_1_Boss_Spawn_17)
set Boss_Spawn_RedY[18] = GetRectCenterY(gg_rct_Player_1_Boss_Spawn_18)
// did not fix yet
set udg_Boss_Spawn_Blue[1] = GetRectCenter(gg_rct_Player_2_Boss_Spawn_1)
set udg_Boss_Spawn_Blue[2] = GetRectCenter(gg_rct_Player_2_Boss_Spawn_2)
set udg_Boss_Spawn_Blue[3] = GetRectCenter(gg_rct_Player_2_Boss_Spawn_3)
set udg_Boss_Spawn_Blue[4] = GetRectCenter(gg_rct_Player_2_Boss_Spawn_4)
set udg_Boss_Spawn_Blue[5] = GetRectCenter(gg_rct_Player_2_Boss_Spawn_5)
set udg_Boss_Spawn_Blue[6] = GetRectCenter(gg_rct_Player_2_Boss_Spawn_6)
set udg_Boss_Spawn_Blue[7] = GetRectCenter(gg_rct_Player_2_Boss_Spawn_7)
set udg_Boss_Spawn_Blue[8] = GetRectCenter(gg_rct_Player_2_Boss_Spawn_8)
set udg_Boss_Spawn_Blue[9] = GetRectCenter(gg_rct_Player_2_Boss_Spawn_9)
set udg_Boss_Spawn_Blue[10] = GetRectCenter(gg_rct_Player_2_Boss_Spawn_10)
set udg_Boss_Spawn_Blue[11] = GetRectCenter(gg_rct_Player_2_Boss_Spawn_11)
set udg_Boss_Spawn_Blue[12] = GetRectCenter(gg_rct_Player_2_Boss_Spawn_12)
set udg_Boss_Spawn_Blue[13] = GetRectCenter(gg_rct_Player_2_Boss_Spawn_13)
set udg_Boss_Spawn_Blue[14] = GetRectCenter(gg_rct_Player_2_Boss_Spawn_14)
set udg_Boss_Spawn_Blue[15] = GetRectCenter(gg_rct_Player_2_Boss_Spawn_15)
set udg_Boss_Spawn_Blue[16] = GetRectCenter(gg_rct_Player_2_Boss_Spawn_16)
set udg_Boss_Spawn_Blue[17] = GetRectCenter(gg_rct_Player_2_Boss_Spawn_17)
set udg_Boss_Spawn_Blue[18] = GetRectCenter(gg_rct_Player_2_Boss_Spawn_18)
//changed already and works fine
set Unit_Runner_Spawn[1] = 'h00C'
set Unit_Runner_Spawn[2] = 'h01Y'
set Unit_Runner_Spawn[3] = 'h01Z'
set Unit_Runner_Spawn[4] = 'h020'
set Unit_Runner_Spawn[5] = 'h021'
set Unit_Runner_Spawn[6] = 'h022'
set Unit_Runner_Spawn[7] = 'h023'
set Unit_Runner_Spawn[8] = 'h024'
set Unit_Runner_Spawn[9] = 'h025'
set Unit_Runner_Spawn[10] = 'h026'
set Unit_Runner_Spawn[11] = 'h027'
set Unit_Runner_Spawn[12] = 'h028'
set Unit_Runner_Spawn[13] = 'h029'
set Unit_Runner_Spawn[14] = 'h02A'
set Unit_Runner_Spawn[15] = 'h02B'
set Unit_Runner_Spawn[16] = 'h02C'
set Unit_Runner_Spawn[17] = 'h02D'
set Unit_Runner_Spawn[18] = 'h02E'
set Unit_Runner_Spawn[19] = 'h02F'
set Unit_Runner_Spawn[20] = 'h02G'
set Unit_Runner_Spawn[21] = 'h02H'
set Unit_Runner_Spawn[22] = 'h02I'
set Unit_Runner_Spawn[23] = 'h02J'
set Unit_Runner_Spawn[24] = 'h02K'
set Unit_Runner_Spawn[25] = 'h02L'
set Unit_Runner_Spawn[26] = 'h02M'
set Unit_Runner_Spawn[27] = 'h02N'
set Unit_Runner_Spawn[28] = 'h02O'
set Unit_Runner_Spawn[29] = 'h02P'
set Unit_Runner_Spawn[30] = 'h02Q'
set Unit_Runner_Spawn[31] = 'U00A'
set udg_Hero_Selecting_Unit_Player[1] = gg_unit_Peas_0002
set udg_Hero_Selecting_Unit_Player[2] = gg_unit_Peas_0017
endfunction
//===========================================================================
function InitTrig_Unit_Spawns takes nothing returns nothing
set gg_trg_Unit_Spawns = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Unit_Spawns, 0.00 )
call TriggerAddAction( gg_trg_Unit_Spawns, function Trig_Unit_Spawns_Actions )
endfunction
the problem is tht the boss killd message gets displayed but after tht it stops any reason y ? thanks for any help
Last edited: