Hi everyone
I have read "things that leak" by Ralle but there still seems to be leaks... the spawned units goes back to their spawnpoints halfway to their destination when attacked(have set "can flee" to false).
What do you guys suggest I do to fix this?
Thanks
I have read "things that leak" by Ralle but there still seems to be leaks... the spawned units goes back to their spawnpoints halfway to their destination when attacked(have set "can flee" to false).
What do you guys suggest I do to fix this?
Thanks
JASS:
function Trig_Lane_1_Actions takes nothing returns nothing
set udg_TG_Spawn_South_Temp[1] = GetUnitLoc(gg_unit_ewsp_0007)
set udg_TG_Spawn_South[1] = udg_TG_Spawn_South_Temp[1]
set udg_TG_Spawn_South_Temp[2] = GetUnitLoc(gg_unit_ewsp_0043)
set udg_TG_Spawn_South[2] = udg_TG_Spawn_South_Temp[2]
set udg_Attack_South_Temp[1] = GetUnitLoc(gg_unit_ewsp_0061)
set udg_Attack_South[1] = PolarProjectionBJ(udg_Attack_South_Temp[1], 100.00, 180.00)
set udg_Attack_South_Temp[2] = GetUnitLoc(gg_unit_ewsp_0008)
set udg_Attack_South[2] = PolarProjectionBJ(udg_Attack_South_Temp[2], 100.00, 180.00)
// Spawn & Move Creeps
call CreateNUnitsAtLoc( ( udg_NumberOfHeroes * 1 ), ChooseRandomCreepBJ(udg_AvgLevel), Player(PLAYER_NEUTRAL_AGGRESSIVE), udg_TG_Spawn_South[1], bj_UNIT_FACING )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "attack", udg_Attack_South[1] )
call CreateNUnitsAtLoc( ( udg_NumberOfHeroes * 1 ), ChooseRandomCreepBJ(udg_AvgLevel), Player(PLAYER_NEUTRAL_AGGRESSIVE), udg_TG_Spawn_South[2], bj_UNIT_FACING )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "attack", udg_Attack_South[2] )
// Resurrect Destructable & Destroy Locations
call TriggerSleepAction( 0.50 )
call DestructableRestoreLife( gg_dest_DTlv_0386, 100.00, true )
call RemoveLocation(udg_TG_Spawn_South_Temp[1])
call RemoveLocation(udg_TG_Spawn_South_Temp[2])
call RemoveLocation(udg_TG_Spawn_South[1])
call RemoveLocation(udg_TG_Spawn_South[2])
call RemoveLocation(udg_Attack_South_Temp[1])
call RemoveLocation(udg_Attack_South_Temp[2])
call RemoveLocation(udg_Attack_South[1])
call RemoveLocation(udg_Attack_South[2])
endfunction
//===========================================================================
function InitTrig_Lane_1 takes nothing returns nothing
set gg_trg_Lane_1 = CreateTrigger( )
call TriggerRegisterDeathEvent( gg_trg_Lane_1, gg_dest_DTlv_0386 )
call TriggerAddAction( gg_trg_Lane_1, function Trig_Lane_1_Actions )
endfunction