Home   Help Search Login Register  

Author Topic: Switch Trigger (Solved)  (Read 2046 times)

0 Members and 1 Guest are viewing this topic.

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Switch Trigger (Solved)
« on: 26 Mar 2009, 05:51:28 »
Hi I have a switch trigger like this in-game..

--------------
TRIGGER
--------------

Type: Switch
Coniditon: C1 in Helo2 && C2 in Helo2 && C3 in Helo2 && C4 in Helo2 && C5 in helo2
On Activation: p2 say "A9"; p2 say "A10"

-----------------------------]

It's a switch trigger because it has to make the waypoint "Destroy" switch to "Get Out"
Trigger is linked to a destroy waypoint, the next waypoint for destroy is getout.

I have the trigger Synced to the "destroy" waypoint.

When I play my mission, it doesn't say the sound I want, basically trigger doesn't work, the waypoint still stays the same "destroy" or "wait for others" after destroy after all the soldiers are in the helo..

Why is this, is the synced linked to the wrong waypoint is  it supposed to be at the "Get Out" waypoint?



« Last Edit: 28 Mar 2009, 03:10:08 by NightJay0044 »
Who's hyped for Arma4, long live Arma!

Offline zwobot

  • Members
  • *
Re: Switch Trigger not working
« Reply #1 on: 26 Mar 2009, 09:26:54 »
I'm not sure if Switch triggers work with every waypoint type. I usually only use them with HOLD and CYCLE waypoints.

Try to use the Switch trigger with a less complex condition for testing, like Radio alpha activation...
"Executing tactics in real combat is the hardest thing one can ever do...well I've never given birth but..well whatever."

Offline Ext3rmin4tor

  • Members
  • *
Re: Switch Trigger not working
« Reply #2 on: 26 Mar 2009, 09:51:45 »
They should work with every waypoint, I tried them also with SEARCH AND DESTROY and MOVE. I don't know if DESTROY is a particular case since it requires to be attached to an object in order to work properly and it requires the object it is attached to is destroyed to skip to the next one.
How can you shoot women and children?
Easy! Ya' just don't lead'em so much! Ain't war hell?!!

Walter_E_Kurtz

  • Guest
Re: Switch Trigger not working
« Reply #3 on: 26 Mar 2009, 15:26:00 »
I know what this has to do with  :whistle:

Don't make it a Switch trigger - a simple None should work fine. The waypoint will then wait for the conditions to be fulfilled and then move on to the next one. The disadvantage is that, in Cadet mode, the waypoint will show as "Waiting for Others" (which is true to a certain extent) rather than "Destroy".

You could try putting two triggers close together in the area in question. Make the first one Destroy, so that the player knows he has to find targets in that area. Once nearby vehicles have been wiped out, it should permit the player to move on to the second. For simplicity's sake, make that Destroy also and sync it to the trigger.

From the player's point of view, he's told to fly somewhere and destroy enemies in that area. Once accomplished, he has to wait for C1 - C5 to board their heli. Then he can fly home and get out.


Furthermore, the trigger condition will need reviewing in case one of them is killed. I suggest:
(count crew heli) == ({alive _x} count units bunch) + 2

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Re: Switch Trigger not working
« Reply #4 on: 27 Mar 2009, 00:53:09 »
So I put

Quote
(count crew heli) == ({alive _x} count units bunch) + 2

in the condition field instead of the C1 in helo and so forth?

Who's hyped for Arma4, long live Arma!

Walter_E_Kurtz

  • Guest
Re: Switch Trigger not working
« Reply #5 on: 27 Mar 2009, 02:25:58 »
Yeah.

I should have said: bunch stands for the name you've given the group, through the init line
bunch = group this

You'll have to change it to what's appropriate. It compares how many people are aboard heli2 (including the pilot & gunner), with the number of people in group bunch plus two (for the driver & gunner).

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Switch Trigger not working
« Reply #6 on: 27 Mar 2009, 03:20:04 »
You could have simply taken all of the information within the condition and OnActivation fields of the switch trigger and inserted them into the condition and OnActivation fields of the "Getout" waypoint.

A switch trigger is usually only needed to break a "Cycle" waypoint.

The group would reach the "Destroy" waypoint and wait until the condition(s) are met in the "Getout" waypoint before moving to it and thus activating it.

I have never had problems with multiple conditions so long as the syntax is correct.
 and just as a shot in the dark you could try this, if the above does not work......
Code: [Select]
(C1 in Helo2) && (C2 in Helo2) && (C3 in Helo2) && (C4 in Helo2) && (C5 in helo2)

And as Walter stated,
Code: [Select]
(count crew heli) == ({alive _x} count units bunch) + 2 is a better code(though I am not sure what the +2 represents) to use unless your sure all of the units affecting the condition will remain alive


Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Re: Switch Trigger not working
« Reply #7 on: 27 Mar 2009, 04:14:41 »
Grace, with your code or the one i originally had but you enhanced. Won't it be reliant on each soldier boarding the helo?

Quote
(C1 in Helo2) && (C2 in Helo2) && (C3 in Helo2) && (C4 in Helo2) && (C5 in helo2)

Who's hyped for Arma4, long live Arma!

Offline ProfTournesol

  • Members
  • *
  • OFP Addict
Re: Switch Trigger not working
« Reply #8 on: 27 Mar 2009, 19:34:02 »
Hi,

to check if all units of a group are in a vehicle, whatever other peoples that could be inside it (driver, gunner, other cargos etc...), the following code works well as a condition :

Code: [Select]
"_x in crew name_of_vehicle" count units name_of_group == count units name_of_group
OFP Napoleonic Mod leader - OFP WW1 Mod leader

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Switch Trigger not working
« Reply #9 on: 27 Mar 2009, 20:06:10 »
Grace, with your code or the one i originally had but you enhanced. Won't it be reliant on each soldier boarding the helo?

Quote
(C1 in Helo2) && (C2 in Helo2) && (C3 in Helo2) && (C4 in Helo2) && (C5 in helo2)



Yes, here is my qoute afterwards...
Quote
(count crew heli) == ({alive _x} count units bunch) + 2 is a better code(though I am not sure what the +2 represents) to use unless your sure all of the units affecting the condition will remain alive

So you use your original code only if you know for certain that those units will remain alive.

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Re: Switch Trigger not working
« Reply #10 on: 28 Mar 2009, 03:09:53 »
Thank you all, the code;

Quote
(count crew heli) == ({alive _x} count units bunch) + 2

Works perfect.
Who's hyped for Arma4, long live Arma!