The Neutral Hostile creeps of my map has been placed right from the start and should respawn 60-120 seconds after they have been killed in the exact same position they where placed (not where they where killed). Which is why I am transfering the Creep Respawn system from DotA Tamplate (Map attached)
I've tried to import the trigger: "Store Creeps", The Variables: "LoopCreep", "Creep_Types", "Creep_Position" and The trigger: "Revive Creeps":
function Trig_Revive_Creeps_Actions takes nothing returns nothing
local integer CUSTOM
set CUSTOM = GetUnitUserData(GetDyingUnit())
call TriggerSleepAction( udg_Hostile_Revive_Time )
call CreateNUnitsAtLoc( 1, udg_Creep_Types[CUSTOM], Player(PLAYER_NEUTRAL_AGGRESSIVE), udg_Creep_Positions[CUSTOM], bj_UNIT_FACING )
call SetUnitUserData( GetLastCreatedUnit(), CUSTOM )
endfunction
//===========================================================================
function InitTrig_Revive_Creeps takes nothing returns nothing
set gg_trg_Revive_Creeps = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Revive_Creeps, Player(PLAYER_NEUTRAL_AGGRESSIVE), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_Revive_Creeps, function Trig_Revive_Creeps_Actions )
endfunction
But when I try to save it gives me this:
Script Errors
4 compile errors
Line 318: Expected a name
Line 324: Expected a variable name
Line 325: Expected a name
Line 326: Expected a name
I am clueless what to do about this!
I've tried to import the trigger: "Store Creeps", The Variables: "LoopCreep", "Creep_Types", "Creep_Position" and The trigger: "Revive Creeps":
function Trig_Revive_Creeps_Actions takes nothing returns nothing
local integer CUSTOM
set CUSTOM = GetUnitUserData(GetDyingUnit())
call TriggerSleepAction( udg_Hostile_Revive_Time )
call CreateNUnitsAtLoc( 1, udg_Creep_Types[CUSTOM], Player(PLAYER_NEUTRAL_AGGRESSIVE), udg_Creep_Positions[CUSTOM], bj_UNIT_FACING )
call SetUnitUserData( GetLastCreatedUnit(), CUSTOM )
endfunction
//===========================================================================
function InitTrig_Revive_Creeps takes nothing returns nothing
set gg_trg_Revive_Creeps = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Revive_Creeps, Player(PLAYER_NEUTRAL_AGGRESSIVE), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_Revive_Creeps, function Trig_Revive_Creeps_Actions )
endfunction
But when I try to save it gives me this:
Script Errors
4 compile errors
Line 318: Expected a name
Line 324: Expected a variable name
Line 325: Expected a name
Line 326: Expected a name
I am clueless what to do about this!