exge
New Member
- Reaction score
- 15
is there a way to make multiple conditions without making a new function .. cos i still dont understand kaTTana's local handle vars ... thx
function MY_COND takes nothing returns boolean
return cond1 and cond2
endfunction
loop
set target = GroupPickRandomUnit(targetgrp)
exitwhen ( IsUnitAliveBJ(target) == true ) and ( IsUnitEnemy(target, GetOwningPlayer(caster)) == true )
endloop
phyrex1an said:You don't have to use local vars to pass variable values to other functions, for that you uses parameters (take values, read tutorial).
The 'only' time you must use some kind of handle vars system (or equivalent) is when you must link some data with an object over some time. For example a unit in a timer callback (Unit attached to timer).