Jump to content
Sign in to follow this  
TechnoTerrorist303

Scripted waypoint problem

Recommended Posts

I was posting over the last couple of days with a scripted waypoint problem where I couldn't get an AI pilot to takeoff. I've got that bit working but have now encountered a further problem.

Since the original issue seemed to be caused by the waypoint markers being too far away from the original start point I have had to add some more waypoints for my pilot and noticed two things.

1) On reaching each waypoint the ai pilot climbs to a height of 200m and slows to a stop before diving back down to 50m and continuing on his way. This is not exactly stealthy behaviour

2) When the helicopter gets to the waypoint within roughly 5km off the Chernarus coast it stops and goes into a hover at 200m as if he's about to go to the next destination but he stays in this suicidal position until he runs out of fuel.

While I'm sure that Force Recon Marines are pretty tough, expecting them to dive out of a huey at 200m and then swim 5km before the start of the mission seems a bit harsh.

Does anyone know if there is something I need to do in order to get this chopper past the magical barrier that seems to be protecting the evil invading Russian army?

The code I'm using is very simple, I will post it if requested but all it does is simply assign waypoints to a pilot and I know it works right up to the waypoint that seems to be made of glue. All the waypoints are scripted exactly the same except for the waypoint and marker names.

Share this post


Link to post
Share on other sites

A lot of the time I get what happens in your first case, even on long distance between waypoints it will increase altitude and then duck back down again a few times over the course of the distance. It just seems to be poor speed control by the AI.

Where you or I would reduce the helis throttle, sometimes completely, before slowly pulling back over a long distance to ease of some speed, the AI seems to just pull back full throttle and try to lose speed in a short space.

Maybe using the setvelocity command may help to keep the speed down, or it may just make it worse with the heli doing the climb manoeuvre more frequently to strip of speed.

Problem 2, is the waypoint after the one where the heli sits in the air the unload/load?

If so it is this waypoint that needs looking at more closely and not the move one, try using an invisible H at the landing area etc.

You may want to check your getout commands for the units and maybe review how your dealing with the unload or load.

Usually having a getout for each unit in the action box of the unload waypoint will force them out.

Share this post


Link to post
Share on other sites

Do not use scripted waypoints, they were pretty much made obsolete by the on activation line of any other waypoint type :)

Share this post


Link to post
Share on other sites

There are no invisible H pads involved and all the waypoint types are "move"

The problem seems to be that the LHD the chopper starts on is actually technically off the map (although it can be placed on the editor) and there is a barrier between on map and off it. Once the helo hits the barrier it stops. I can fly this distance myself but I want the players in this mission to have the option to be flown by ai if they wish.

I may have to cheat and just move the chopper using setpos once it hits the wall.

Share this post


Link to post
Share on other sites
There are no invisible H pads involved and all the waypoint types are "move"

The problem seems to be that the LHD the chopper starts on is actually technically off the map (although it can be placed on the editor) and there is a barrier between on map and off it. Once the helo hits the barrier it stops. I can fly this distance myself but I want the players in this mission to have the option to be flown by ai if they wish.

I may have to cheat and just move the chopper using setpos once it hits the wall.

Have you tried using the load or unload on the LHD, maybe force a load and have an AI waiting for pickup on the LHD. Or even use a getout waypoint and see if the pilot will land and indeed get out at the LHD.

the AI may not willingly do a move outside of the boundary but can perhaps be forced into a landing on the LHD, one way or another.

There is also the new capture function with AO if all else fails you can record a landing that you can use.

Share this post


Link to post
Share on other sites

I'm trying to do the opposite. My script spawns an ai pilot and places him in the pilot's seat of an empty uh-1 already placed on the LHD. The purpose of the script is to fly the players into Chernarus, not the other way round!

Share this post


Link to post
Share on other sites

I want a soldier to get in a helicopter, here's the command but it doesnt work. He will move to the heli but not board it.

officer1wp = groupofficer addWaypoint [getPos heli2, 0, 1];

[groupofficer, 1] setWaypointType "GETIN";

Also, I found a bug, CYCLE will NOT work for scripted waypoint. :( Instead of cycling between A and B, once they reach A, the cycle waypoitn will take them 8 km away.

How can I solve this??

Another bug: I cant add another waypoint to the activation box of a previous waypoint by setWaypointStatements because the game thinks i am missing a ]. :\

Edited by ziiip

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  

×