OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Delta on 22 Jul 2007, 01:23:23

Title: probs using ?! to define 2 combat modes
Post 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.


     
Code: [Select]
? ! 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~

Code: [Select]
? 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
Title: Re: probs using ?! to define 2 combat modes
Post by: h- on 22 Jul 2007, 01:28:21
Such checks need to done like this
Code: [Select]
? behaviour _man != "careless": goto "Change"!= means the same is 'is not'..
Title: Re: probs using ?! to define 2 combat modes
Post by: LCD on 22 Jul 2007, 01:29:22
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
Title: Re: probs using ?! to define 2 combat modes
Post by: Delta on 22 Jul 2007, 01:52:14
Fantastic,thanks to you both :)

Delta
Title: Re: probs using ?! to define 2 combat modes
Post by: Mandoble on 22 Jul 2007, 12:16:18
or
Code: [Select]
? !(behaviour _man == "careless") : goto "change"
;)