- Joined
- Mar 29, 2016
- Messages
- 688
I just want to ask which is faster and which is more efficient, manually firing a trigger like so
or this
JASS:
function OnCertainEvent takes nothing returns nothing
call TriggerEvaluate(trig)
endfunction
function SomFunction takes nothing returns nothing
//actions
endfunction
function A takes nothing returns nothing
set trig = CreateTrigger()
call TriggerAddCondition(trig, Filter(function SomeFunction))
endfunction
or this
JASS:
function OnCertainEvent takes nothing returns nothing
set switch = 0
set switch = 1
set switch = 0
endfunction
function SomFunction takes nothing returns nothing
//actions
endfunction
function A takes nothing returns nothing
set trig = CreateTrigger()
call TriggerRegisterVariableEvent(trig, "switch", EQUAL, 1)
call TriggerAddCondition(trig, Filter(function SomeFunction))
endfunction