- Joined
- Jan 9, 2016
- Messages
- 1,487
Is there any way to use a custom script as a condition? Leave JASS out of this.I just need a GUI trigger but with a custom script condition.Can any help?
(required)
if + boolean(-expression) + then
code
(optional)
else
code
(optional)
elseif + boolean(-expression)
code
(required)
endif
true
or false
,does that work?
Well that was very ambiguously worded. Could be taken in 2 ways, not to mention you tend to phrases your questions in rather ambiguous ways to begin withBut I need to know if its possible to create multiple or custom script conditions.
Is this it?
Custom script: if (Condition1) or (Condition2) then
-------- Your Actions here --------
Custom script: elseif (Condition3) or (Condition4) then
-------- Your Actions here --------
Custom script: endif
-------- Or this?? --------
Custom script: if (Condition1) or (Condition2) or (Condition3) then //I'm not sure if this actually worked since I haven't tested on this one.
-------- Your Actions here --------
Custom script: endif
Well that was very ambiguously worded. Could be taken in 2 ways, not to mention you tend to phrases your questions in rather ambiguous ways to begin with
Juts replace and with or
EDIT: looks like bear_369 gotchu![]()
Yes,like that.But,I need all the conditions to do the same actions.I don't wanna use way too long triggers.
function IsVarTrue takes unit u returns boolean
if ((Condition1(u)) or (Condition2(u)) ) then
return true
elseif ((Condition3(u)) or (Condition4(u)) or (Condition5(u)) ) then
return true
//And so on
endif
return false
endfunction