Xenoche
Member
- Reaction score
- 18
Xeno here, I'm simply asking for favour from someone who knows jass, the following code revives neutral hostile creeps, but I want it to not revive neutral hostile creeps that have the 'ancient' classification.
If someone could take this and modify it for me that would be awesome.
If someone could take this and modify it for me that would be awesome.
Code:
function Trig_Respawn5_Func_Test takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) )
endfunction
function Trig_Respawn5_Actions takes nothing returns nothing
local location tmpPoint = GetUnitLoc(GetDyingUnit())
local integer tmpUnit = GetUnitTypeId(GetDyingUnit())
loop
call PolledWait( GetRandomReal(10.00, 20.00) )
exitwhen ( IsUnitGroupEmptyBJ(GetUnitsInRangeOfLocMatching(700.00, tmpPoint, Condition(function Trig_Respawn5_Func_Test))) )
endloop
call CreateNUnitsAtLoc( 1, tmpUnit, Player(PLAYER_NEUTRAL_AGGRESSIVE), tmpPoint, bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_Respawn_Creeps takes nothing returns nothing
set gg_trg_Respawn_Creeps = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Respawn_Creeps, Player(PLAYER_NEUTRAL_AGGRESSIVE), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_Respawn_Creeps, function Trig_Respawn5_Actions )
endfunction