OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Delta on 22 Jul 2007, 01:23:23
-
Hi folks,
Came up a bit stumped with what I thought would be straightforward.
I define the combat mode of a unit to see if its idle,and then the rest of the script carries on.Problem is that I set a continual loop to detect whenever the units combat mode alters.Then need to 'goto' another point in the script or run a new one seperatly.
? ! behaviour _man == "careless": goto "Change"
? ! behaviour _man == "safe": goto "Change"
? behaviour _man == "careless": goto "Idle"
? behaviour _man == "safe": goto "Idle"
The above brings up some error regarding the ?! probably because there are 2 variables I'm defining.
Would using the correct syntax of - IF OR and THEN be a suitable remedy?
I couldnt find a combination that works without errors.
Also I tried this~
? behaviour _man == "careless": goto "Idle"
? behaviour _man == "safe": goto "Idle"
goto "Change"
But that halted everything.
I had a look around but couldnt find anything similar to investigate. :scratch:
Cheers,
Delta
-
Such checks need to done like this
? behaviour _man != "careless": goto "Change"
!= means the same is 'is not'..
-
2 da 1st one u may try
? behaviour _man != "careless" : goto "Change"
also u may try puting () around da stuff dat shud b done 1st as in
? (behaviour _man) != "careless" : goto "change"
cant think of nything else now
LCD OUT
[edit] i posted my post even tho h- answered da same thing cuz of barackets part thingy :D
-
Fantastic,thanks to you both :)
Delta
-
or
? !(behaviour _man == "careless") : goto "change"
;)