i got this code from a tutorial but its writen in jass and i dont realy know how to edit it correctly help please.
what it does (i think) is respawn every 60 secs, what i need is to respawn when a player types in -enter as an exact match and is region X contains no unit=false.
this is the other part to the trigger just incase it's needed.
also is this part required for the trigger to run?
and what is this doing?
thanks for any help
what it does (i think) is respawn every 60 secs, what i need is to respawn when a player types in -enter as an exact match and is region X contains no unit=false.
JASS:
function Trig_Revive_Creeps_Actions takes nothing returns nothing
local integer CUSTOM
set CUSTOM = GetUnitUserData(GetDyingUnit())
call TriggerSleepAction( 60.00 )
call CreateNUnitsAtLoc( 1, udg_Creep_Type[CUSTOM], Player(PLAYER_NEUTRAL_AGGRESSIVE), udg_Creep_Position[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
this is the other part to the trigger just incase it's needed.
Code:
INIT Store Creeps
Events
Map initialization
Time - Elapsed game time is 2.00 seconds
Conditions
Actions
Set Loop = 0
Unit Group - Pick every unit in (Units owned by Player 12 (Brown)) and do (Actions)
Loop - Actions
Set Creep_Type[Loop] = (Unit-type of (Picked unit))
Set Creep_Position[Loop] = (Position of (Picked unit))
Unit - Set the custom value of (Picked unit) to Loop
Set Loop = (Loop + 1)
Destructible - Pick every destructible in (Playable map area) and do (Actions)
Loop - Actions
Destructible - Open All walls of (Picked destructible)
also is this part required for the trigger to run?
Code:
Destructible - Pick every destructible in (Playable map area) and do (Actions)
Loop - Actions
Destructible - Open All walls of (Picked destructible)
and what is this doing?
Code:
Set Loop = (Loop + 1)
thanks for any help