Jump to content
Sign in to follow this  
jorxe33

AH-1Z taking off when detects opfor

Recommended Posts

Hello, I'm trying on a mission where a AH-1Z takes off and go to some waypoint when detect opfor (Initially the helicopter is landed and the pilots inside) ¿is there a simple way to do this?

Thanks in advance

Share this post


Link to post
Share on other sites

you need to place your cobra with waypoint "hold" (and place other waypoints).

then, make a trigger on the desired area with :OPFOR - detected by west - interrupter

synchronize it with the "hold" waypoint

that way, the cobra will remain still until opfor is detected by west. when opfor is detected, the cobra will take off and follow the other waypoints

Share this post


Link to post
Share on other sites

Place a HOLD waypoint directly in front of the AH-1Z and synchronize that with your OPFOR detected trigger which is set to TYPE = Switch. Here's a quick demo.

Share this post


Link to post
Share on other sites

Thanks for the demo, it works perfectly! :bounce3: :bounce3: :bounce3:

I have only one more question, in the mission I have too many soldiers (100 or 120) how do I activate the trigger when only one of them dies?

I remember seeing something like this but I've been looking unsuccessfully.

Share this post


Link to post
Share on other sites

write this in the condition line of the trigger:

!alive nameofthesoldier

Share this post


Link to post
Share on other sites

Its when any one dies (only one), a kind of alert.

Share this post


Link to post
Share on other sites

You could count the units at the beginning of the map and then trigger it when the alive count drops below that. Detected by usually covers this though, but sometimes neither should like with a stealth kill.

Here's one way of doing it:

In the init of the player or a gameLogic or something put:

totalUnits = {alive _x && side _x == west} count allUnits;

Then instead of the detected by trigger you'd change the condition of the trigger to this:

{alive _x && side _x == west} count allUnits < totalUnits

Share this post


Link to post
Share on other sites

Excellent! it works perfectly.

Excuse my lack of knowledge, but I put:

totalUnits = {alive _x && side _x == west} count allUnits

instead of:

totalUnits = {alive _x && side _x == west} count allUnits;

(I did not put ";" at the end) and it worked too

I don't know why.

Share this post


Link to post
Share on other sites

In init fields you don't really need it unless there will be multiple commands following. The ; symbol is basically the "end of line" marker. You usually always need it, so might as well get in the hang of putting it. :) If you'd put that line in the init.sqf for example you'd have needed to add the ; Also if you were going to do something else like in the example I was making you'd have needed it:

totalUnits = {alive _x && side _x == west} count allUnits; hint format["There are %1 enemy units", totalUnits];

That said, in condition fields of a trigger you do not want the ;

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×