Expelliarmus
Where to change the sig?
- Reaction score
- 48
1. Is it possible to have Actions in conditions and no action at all?
2. Is it possible to have Conditions in actions and no condition at all?
3. Is it generally faster than when separated?
2. Is it possible to have Conditions in actions and no condition at all?
3. Is it generally faster than when separated?
JASS:
function Actions takes nothing returns nothing
if some condition then
// some Actions...
endif
endfunction
//===========================================================================
function InitTrig takes nothing returns nothing
local trigger trig = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ(...)
call TriggerAddAction( trig, function Actions )
endfunction
JASS:
function Condition takes nothing returns nothing
if some condition then
// some Actions...
endif
return false
endfunction
//===========================================================================
function InitTrig takes nothing returns nothing
local trigger trig = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ(...)
call TriggerAddCondition( trig, Condition( function Condition ) )
endfunction
JASS:
function Condition takes nothing returns nothing
return true
endfunction
function Actions takes nothing returns nothing
// some Actions...
endfunction
//===========================================================================
function InitTrig takes nothing returns nothing
local trigger trig = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ(...)
call TriggerAddCondition( trig, Condition( function Condition ) )
call TriggerAddAction( trig, function Actions )
endfunction