Home   Help Search Login Register  

Author Topic: Trigger is apparently activating early  (Read 573 times)

0 Members and 1 Guest are viewing this topic.

voodooserpent

  • Guest
Trigger is apparently activating early
« on: 06 Mar 2004, 02:00:11 »
I have a trigger condition getdammage m2eboat1 == 1; getdammage m2eboat2 == 1 and it does that up to boat6. For some reason, when you destroy boat6, it activates the trigger regardless of having destroyed boats 1-5 or not.

j-man

  • Guest
Re:Trigger is apparently activating early
« Reply #1 on: 06 Mar 2004, 02:17:36 »
Code: [Select]
(!alive m2eboat1) && (!alive m2eboat2) &&  (!alive m2eboat3) &&  (!alive m2eboat4) &&  (!alive m2eboat5) &&  (!alive m2eboat6)
« Last Edit: 06 Mar 2004, 02:19:09 by j-man »

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Trigger is apparently activating early
« Reply #2 on: 06 Mar 2004, 02:17:46 »
You need to link your conditions, using the AND instead of
the ;

; is seen as OR in conditions

Therefore x ; y as a condition will match if x or y happens,
while x AND y does match only if x AND y happen  ;)

:edit - off course what j-man said is also ok, as && is the
same thing like: AND

::edit - and here's another condition, doing the same thing
in only one statement:

Code: [Select]
"getdammage _x == 1" count [me2boat1,me2boat2,me2boat3,me2boat4,me2boat5,me2boat6] == count [me2boat1,me2boat2,me2boat3,me2boat4,me2boat5,me2boat6]
Anyways you should better use < 0.99 instead of == 1, as
it sometimes happens that the damage value isn't exactly
1.

~S~ CD
« Last Edit: 06 Mar 2004, 02:25:05 by Chris Death »
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

voodooserpent

  • Guest
Re:Trigger is apparently activating early
« Reply #3 on: 06 Mar 2004, 03:05:44 »
I tried AND originally.....And it's strange, when I used the ; the condition would only activate if boat6 was destroyed. Thanks though, I'll try those

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Trigger is apparently activating early
« Reply #4 on: 06 Mar 2004, 04:07:39 »
Quote
And it's strange, when I used the ; the condition would only activate if boat6 was destroyed

Yep, wrong explanation from me before.

The semicolon isn't handled like an OR statement, it's still
handled as supposed to be => add another condition/statement/command to the previous one.

e.g: if you want to use two commands in the onActivation line,
you would have to seperate them by a semicolon.

If you do that in the condition field, only it can only have one
condition in whole. That means you need to stick more than
one conditions together by using AND OR statements, to
make the whole condition in one.

Now if you seperate them by the semicolon, you create more
than one condition, so every further condition than the first
one will overule the previous one. In your case the last condition was the one for me2boat6 - you get what i mean  :)

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

voodooserpent

  • Guest
Re:Trigger is apparently activating early
« Reply #5 on: 06 Mar 2004, 21:28:09 »
I like the      (!alive unit) &&      thing a lot. If I make it without the ! will it check to see if the unit is alive rather than dead?

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Trigger is apparently activating early
« Reply #6 on: 06 Mar 2004, 22:07:32 »
! just means not

So
!alive
means the same as
not alive

And yes, alive checks if it is alive, !alive checks if it is, well, not alive, which is usually the same as dead.
Plenty of reviewed ArmA missions for you to play

voodooserpent

  • Guest
Re:Trigger is apparently activating early
« Reply #7 on: 08 Mar 2004, 04:56:28 »
Yah, I figured ! meant not. Thanks : P