Anything.
New Member
- Reaction score
- 69
I know abosolutely nothing about JASS and I want to change this code by AceHart to when a unit owned by Player 10 dies instead of Neutral Agressive.
Can someone help me?
Code:
function Trig_RespawnCreeps_Test takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) )
endfunction
function Trig_RespawnCreeps_Actions takes nothing returns nothing
local location Position = GetUnitLoc(GetDyingUnit())
local integer Level = GetUnitLevel(GetDyingUnit())
loop
call PolledWait( GetRandomReal(25.00, 30.00) )
exitwhen ( IsUnitGroupEmptyBJ(GetUnitsInRangeOfLocMatching(300.00, Position, Condition(function Trig_RespawnCreeps_Test))) == true )
endloop
call CreateNUnitsAtLoc( 1, ChooseRandomCreepBJ(Level), Player(PLAYER_NEUTRAL_AGGRESSIVE), Position, bj_UNIT_FACING )
endfunction
function InitTrig_RespawnCreeps takes nothing returns nothing
set gg_trg_RespawnCreeps = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_RespawnCreeps, Player(PLAYER_NEUTRAL_AGGRESSIVE), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_RespawnCreeps, function Trig_RespawnCreeps_Actions )
endfunction