Jump to content
Sign in to follow this  
Bastirip

Heli Land + check all players onboard + takeoff and get a new waypoint

Recommended Posts

Me again :) ,

i have a problem. I want a helicopter for exfil my team.

this is what it should be:

- helo waits on WP1 (Waypoint1)

- Trigger fires, WP2 for Helo is activated and it´s on the way

- helo land at WP2 and wait until all human Coop Players are in

- helo gets WP3, take of and fly away

- on the way to WP3 helo hits a trigger, Mission End

Now the Problems. WP1 and WP2 are good, helo wait and land on WP2. I tried to put a trigger down (for WP3) to check if all Players are in:

{alive _X && !(_X in crew heli1)} count playersArray <= 0

But now the helo won´t land. He is hoovering on about 20 meters and nothing happen.

For a nother trigger i use this

call {_numwest = 0; {if (side (group _x) == west && isPlayer _x && alive _x) then {_numwest = _numwest + 1}} forEach playableUnits; _westinlist = 0;{if (isPlayer _x && alive _x) then {_westinlist = _westinlist + 1}} forEach thislist;_westinlist == _numwest}

to check if all Human Players are in area. But i don´t know how i use this for a helo.

I hope you guys understand the problem i have :)

It´s not that easy to describe my problem in english, it´s not my native language :)

If you need more informations just ask, I am very grateful for all of your help.

Greetings

Share this post


Link to post
Share on other sites

Name your heli (for this example I'm gonna use "rescueHeli") and use this as the condition:

{_x in rescueHeli && alive _x && isPlayer _x} count playableUnits == {alive _x && isPlayer _x} count playableUnits

This will check if the number of people in the heli is the same amount of people currently in your server (independant which side they're on).

edit:

Okay I just did test this, here's my test setup:

I placed a waypoint (type: MOVE) near an (invisible H) and forced the heli to land there (into the act-field: "rescueHeli land 'GET IN';")

The next waypoint is of type: HOLD and is synchronized with a trigger (type: Switch) in which I put the above condition.

The last waypoint is a MOVE one which leds somewhere far away.

The heli flies near the invisible H, lands there and waits until I'm in. I know, this won't qualify to assert the success of this test, but I'm pretty sure the condition will also work in MP :D

Edited by XxAnimusxX

Share this post


Link to post
Share on other sites

Thank you for the quick reply. I'll Test it later an Tell you if it work.

Grüße aus Bayern ;)

Edit:

First thing, i posted this in the wrong forum :) i build this mission in ArmA III Editor :)

But it work anyway, with a few minor changes.

My code i put it the condition of the WP3 (WP after load the team):

  {_x in heli1 && alive _x && isPlayer _x} count switchableUnits == {alive _x && isPlayer _x} count switchableUnits  

For all those who want to use this in ArmA III, before you can use this code in the final mission, you need to change "switchableUnits" to "playableUnits"

Put the code into the condition of the next WP means i need no trigger for that.

@ XxAnimusxX: thank you very much!

Greetings

Edited by Bastirip

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  

×