Jump to content
RealLocutus

Unexpected actions of a helicopter with waypoints

Recommended Posts

Hi,

I hope someone can help me with this. I am not a pro in scripting missions so I got some tutorial videos on youtube and tried to do it in my mission. 

 

My goal in the mission:

Make a helicopter stand at the airport, waiting. In the heli there is Pilot and co-pilot as well as 6 para troopers. On startup of the mission I disable the Movement of the pilot - with "helo 1 disableAI "MOVE"" - works so far. Then there is a trigger which is activated by BLUFOR that enables the Movement again. So when the trigger is activated the heli starts and moves to his 1st waypoint. That also works just fine. At the first waypoint there is a second trigger which is activated by the helicopter itself - it makes the para troopers eject from the heli. This also works fine. After that the heli has a new move waypoint and after that there is a last "Land" Waypoint. But that is the point that does not work - after dropping the para troopers the heli lands about 100m away from the first waypoint near a town. Needles to say that there is no waypoint telling him to do so.

 

So anybody knows how I get the heli to fly on and get to his last checkpoint to land there?

 

Here a video where you can see what happens: 

 

Share this post


Link to post
Share on other sites

Use a Load WP where you want it to land. In the init of the Load Wp put

Quote

dostop evac; evac land "land";

 

Change evac to your heli's VarName.

Share this post


Link to post
Share on other sites

Well that does not work either. I kept the first move waypoint and removed the "Land" one and changed it to a "Load" Waypoint. 

It seems the heli ignores every waypoint after the first one. 

 

Another problem is that the waypoint does not have an Init field?

https://steamcommunity.com/sharedfiles/filedetails/?id=3289400463

Share this post


Link to post
Share on other sites
8 hours ago, RealLocutus said:

So anybody knows how I get the heli to fly on and get to his last checkpoint to land there?

Try and use an invisible helipad with a waypoint as ai in helis go for helipads and if they dont have one they go for

a flat clearing closest to them.

Share this post


Link to post
Share on other sites

Tried it - did not work. As I said it seems that the heli ignores the waypoints after the first one. It flies to the first waypoint drops the para troopers there and then lands near the first waypoint and does not fly on to the next waypoint that is some kilometers away. And I don't get why. 

 

Is there a way that the unit does not stop at the waypoint? So that it just passes the waypoint and goes on in its current speed to the next waypoint?

Share this post


Link to post
Share on other sites
5 hours ago, RealLocutus said:

As I said it seems that the heli ignores the waypoints after the first one.

Ya per your video i created the same exact scenario on Malden with same code and everything to try to replicate it, and i found it to do the same exact thing,

however without infantry in the cargo of the Orca the heli will follow its waypoints.

   im thinking instead of having ai in the cargo to spawn them at that point at which they would normally be ejected and then the heli would then follow the waypoints, but

i think thats not realistic unless your not seeing the heli at the start anyways. So my suggestion then would be as follows:

5 hours ago, RealLocutus said:

Is there a way that the unit does not stop at the waypoint? So that it just passes the waypoint and goes on in its current speed to the next waypoint? 

You could just use a script instead to call for paratroopers to be dropped at a certain position, from there once their dropped the

helicopter would then fly off and be deleted.  I mean in your scenario as you have it you have the heli flying to some point and then landing,

but after he flies off ejects the paratroopers your not seeing him anymore after that. 

 

    I have a script that will do just this, where you can call the heli at any point, via the same method, heli will fly in drop the paras, fly off into

the distance and delete, and you can set that up as many times as you want, you can define what paras get dropped,

and even define what the heli will be.

 

Btw what units in your heli did you use for the paras and im assuming they had parachutes on them already because i just used a Opfor fireteam

and when they got out of the heli over the hill they all fell to their death, no parachutes.

  • Like 2

Share this post


Link to post
Share on other sites

My way:

forget edited waypoints.

Your group : redGrp1 (or else) for jumpers, not helo crew!
coordinates: adjust to your scenario
trig1 as trigger for take off (or else)

 

in init field of orca1 (red helo):

 

this spawn {
  waitUntil {sleep 1; triggerActivated trig1};
  private _wp1 = group _this addWaypoint [[3757,4919,0],0];
  _wp1 setWaypointType "MOVE";
  _wp1 setWaypointStatements ["TRUE","{_x leaveVehicle orca1; _x action ['getOut',orca1]} forEach units redGrp1"];
  private _wp2 = group _this addWaypoint [[1794,5504,0],0];
  _wp1 setWaypointType "MOVE";
  private _wp3 = group _this addWaypoint [[3910,7030,0],0];
  _wp3 setWaypointType "MOVE";
  _wp3 setWaypointStatements ["TRUE","vehicle this land 'land'"];
};

 

Note: waypoint statement is not allowed for suspension (not scheduled code). So, you can't sleep the action between 2 jumps. Anyway, the code works if there is no suspension (sleep). So, test it.

  • Like 2

Share this post


Link to post
Share on other sites

@Gunter Severloh: Thanks for your video - I did all like you mentioned it in the video. But it kind of does not work. 

I changed the heli to an unarmed version of the Orca - seems to work as it spawns in the heli.

I have added the actiovation to a trigger when the blufor is in that trigger it activates - seems also to be OK (otherwise the heli would not spawn at all)

I have added the targetPos to a Radio tower in the Variable field. Dont know if it works but the heli flys there. 

I have edited the group that should be dropped like you have shown it with the config viewer. (just checked they are sitting in the heli so this should also be OK)

I have NOT changed anything else in the file.

 

Now the problem is the heli flys there - and then stops and only hovers in place. He does not drop any troopers and also he does not fly away. He just hovers there.

Help pls - I have no idea what I did wrong.

 

EDIT:

When I am now thinking a little bit about it - could the reason be....?

 

You showed this working as a support for your side (blufor) - and if I understand it correct the script searches for the nearest player? I guess on the same side as the troops that should be dropped? 

Problem is I want to get paratroopers for the enemy. So the soldiers in there are OPFOR and the player is BLUFOR. Could this be the problem? 

 

EDIT2:

Ok problem is fixed - it works now. We changed the script that it does not search for the position of the nearest player anymore but instead for the same object (targetPos) as the heli flys to. And so it works now - the heli flys to the radio tower (the object with the targetPos) and it drops the troopers there and then flys off.

  • Like 2

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

×