Home   Help Search Login Register  

Author Topic: probs using ?! to define 2 combat modes  (Read 1035 times)

0 Members and 1 Guest are viewing this topic.

Offline Delta

  • Members
  • *
  • Shazayme, Babye !
probs using ?! to define 2 combat modes
« 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
« Last Edit: 22 Jul 2007, 01:25:09 by Delta »

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: probs using ?! to define 2 combat modes
« Reply #1 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'..
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re: probs using ?! to define 2 combat modes
« Reply #2 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
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Delta

  • Members
  • *
  • Shazayme, Babye !
Re: probs using ?! to define 2 combat modes
« Reply #3 on: 22 Jul 2007, 01:52:14 »
Fantastic,thanks to you both :)

Delta

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: probs using ?! to define 2 combat modes
« Reply #4 on: 22 Jul 2007, 12:16:18 »
or
Code: [Select]
? !(behaviour _man == "careless") : goto "change"
;)