Im having proplem with This creep respawn.
And
Okey got it fixed. But now faced new proplem. When creep dies this trigger should rescurrect it into place it does stand after 12 seconds,But Somehow,It does rescurrect it in other place.
As Allways,+ Rep to helpers
Code:
function Revive_Creeps_Jass_Conditions takes nothing returns boolean
return GetOwningPlayer(GetTriggerUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE)
endfunction
function Revive_Creeps_Jass_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local location l = GetUnitLoc(u)
call PolledWait(YOUR TIME)
call CreateNUnitsAtLoc(1,GetUnitTypeId(u),Player(PLAYER_NEUTRAL_AGGRESSIVE),l,bj_UNIT_FACING)
call RemoveLocation(l)
set l = null
set u = null
endfunction
//===========================================================================
function InitTrig_Revive_Creeps_Jass takes nothing returns nothing
set gg_trg_Revive_Creeps_Jass = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Revive_Creeps_Jass, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Revive_Creeps_Jass, Condition( function Revive_Creeps_Jass_Conditions ) )
call TriggerAddAction( gg_trg_Revive_Creeps_Jass, function Revive_Creeps_Jass_Actions )
endfunction
And
Code:
function Revive_Creeps_Jass_Conditions takes nothing returns boolean
return GetOwningPlayer(GetTriggerUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE)
endfunction
function Revive_Creeps_Jass_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local location l = GetUnitLoc(u)
call PolledWait(YOUR TIME)
call CreateNUnitsAtLoc(1,GetUnitTypeId(u),Player(PLAYER_NEUTRAL_AGGRESSIVE),l,bj_UNIT_FACING)
call RemoveLocation(l)
set l = null
set u = null
endfunction
//===========================================================================
function InitTrig_Revive_Creeps_Jass takes nothing returns nothing
set gg_trg_Revive_Creeps_Jass = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Revive_Creeps_Jass, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Revive_Creeps_Jass, Condition( function Revive_Creeps_Jass_Conditions ) )
call TriggerAddAction( gg_trg_Revive_Creeps_Jass, function Revive_Creeps_Jass_Actions )
endfunction
Okey got it fixed. But now faced new proplem. When creep dies this trigger should rescurrect it into place it does stand after 12 seconds,But Somehow,It does rescurrect it in other place.
As Allways,+ Rep to helpers