OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: The-Architect on 26 Mar 2008, 03:05:24
-
I've been out of the loop for too long.
How do I check if multiple conditions have been met an a script?
Let's call my conditions,
Con1
Con2
Con3
Appreciate it. Cheers.
-
Wouldn't you use a GameLogic Unit?
Create an "AND" Waypoint off it, then synchronise seperate Triggers with each of the conditions to that Waypoint?
It's in the Guide on the site if I haven't made myself clear enough.
-
if (Con1 && Con2 && Con3) then {blah blah}
or
? Con1 && Con2 && Con3 : blah blah
or for a trigger
Condition: Con1 && Con2 && Con3
On activation : Blah blah
Not much harder than that. ;)
Wolfrug out.
-
Cheers for the syntax Wolfrug.
Here's what's not working.
I have four triggers. Each of the triggers are set to BLUFOR. On activation in each is 1Clear 2Clear 3Clear respectivley.
Here's my code.
#Start
? 1Clear && 2Clear && 3Clear : goto "exit"
~1
goto "Start"
#Exit
hint "All CLear"
Exit
Nothing is happening once all my guys have past through the triggers. :(
-
I guess it's up to me to ask the dumb questions :D
In the on activations, did you clearly typed:
1clear = true
Did you tried to hint out the status of the conditions?
-
Yes to both.
If I use Wolf's code;
Condition: Con1 && Con2 && Con3
On activation : Blah blah
then it asks me for missing (
Fixed it.
Although I originally said my condidtions were Con1, 2 etc. When I wrote the script I made the conditions 1Clear, 2Clear, etc. ArmA Doesn't like the first character in a condition to be a number so I swapped the number to the end and made the conditions Clear1, Clear2 etc. Now it works fine.
Thanks for the help guys. :good: