Home   Help Search Login Register  

Author Topic: or not and in the same line  (Read 358 times)

0 Members and 1 Guest are viewing this topic.

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
or not and in the same line
« on: 16 Sep 2004, 15:47:42 »
Hey folks,

Long time no question. Now I've been puzzled for too long with a problem and I just need a confirmation that "I've got the line right, but it's just not working".

I've got a loop that checks the following line. What it should ask is "if any of the four objects is NOT in the array AND if a units distance to a player groups leader is less than 30".

This is the line and it doesn't work. No error message though.
?(!(mokravratatrig in towntrigarray) || !(mokropsytrig in towntrigarray) || !(troskytrig in towntriggerarray) || !(kvildatrig in towntrigarray)) && (vakoc distance (leader maingroup) < 30):  goto "continue"

This line works
?!(mokravratatrig in towntrigarray): goto "continue"

This line also works
?(vakoc distance (leader maingroup) < 30):  goto "continue"

What's up with that?  ???
Not all is lost.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:or not and in the same line
« Reply #1 on: 16 Sep 2004, 15:53:38 »
To make it easier to read .....

?(
!(mokravratatrig in towntrigarray) ||
!(mokropsytrig in towntrigarray) ||
!(troskytrig in towntriggerarray) ||
!(kvildatrig in towntrigarray)
) &&
(vakoc distance (leader maingroup) < 30)
:  goto "continue"

« Last Edit: 16 Sep 2004, 15:53:59 by macguba »
Plenty of reviewed ArmA missions for you to play

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:or not and in the same line
« Reply #2 on: 16 Sep 2004, 16:01:12 »
;D  So I was right the first time, there IS a standard solution.

Your OBE is in the post.  :toocool:

This is working out just fine. We should team up.. work for OFPEC together or something maybe.  ;D

Cheers mac  ;)
Not all is lost.