1. Is there a way to turn on/off triggers in Jass
2. If several event happens at the same time and i use the same local name and type will it bug/leak?
It's this tirgger
2. If several event happens at the same time and i use the same local name and type will it bug/leak?
It's this tirgger
JASS:
function Trig_East1_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(11) ) ) then
return false
endif
return true
endfunction
function Trig_East1_Actions takes nothing returns nothing
local location ctn = GetRectCenter(gg_rct_Castle_Emplacement)
call IssuePointOrderLocBJ( GetTriggerUnit(), "attack", ctn)
call RemoveLocation( ctn)
set ctn = null
endfunction
//===========================================================================
function InitTrig_East1 takes nothing returns nothing
set gg_trg_East1 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_East1, gg_rct_EastSpawn1 )
call TriggerAddCondition( gg_trg_East1, Condition( function Trig_East1_Conditions ) )
call TriggerAddAction( gg_trg_East1, function Trig_East1_Actions )
endfunction