Jump to content
Sign in to follow this  
LibertyBull

Confusing AI Heli Waypoint Behavior

Recommended Posts

Hello all.  :)

 

So I'm making a mission in which your unit starts at base, loads into a helicopter, flys to the AO and unloads from their helicopter on the ground. The heli then circles overhead, before landing again and picking up the unit.

 

When making the waypoints, the heli gets to the area, drops the unit and fly's my cycled waypoint circle no problem. The problem is once I add in the waypoints in the editor for it to "skip waypoint" out of the cycle and go to load the unit for the second time (in the field). When I test the mission, the helicopter spools up and takes off without my squad. Before, working correctly, the helicopter would stay on the ground at base and wait for my unit to load before spooling up and taking off.

 

After adding in the waypoints beyond the "cycle" waypoint (and more specifically, adding the second "load" waypoint, to pick up the unit in the field) the helicopter spools up and takes off without my unit. Actually, my unit doesnt even seem to give the "get in" order anymore, just a "move to" order.  :wacko:

 

Whats more, once I delete the waypoints I added in to attempt to go back to the previous, working behavior, the helicopter keeps acting up. Any ideas on why this is happening?  :blink:

 

The only mods I am running is "Eden enhanced".

 

P.S. If it helps, the ultimate goal I'm trying to achieve is to have the heli drop off my group, circle overhead untill a condition is met (such as blowing up an objective on the ground), and then come down to pick u my group before continuing on to the next objective where it will do the same thing again. This is for a single player mission.

 

Thanks in advance!  :D

Share this post


Link to post
Share on other sites

One suggestion I can offer is to use the loiter waypoint instead of a cycle waypoint for the helicopter to remain on station. You can set the direction you want the helicopter to circle the area now; it's quite handy and might help solve your issue if it's related to the cycle waypoint somehow.

Also, make sure you set the helicopter's behavior to careless. It sounds like perhaps the pilot is still in combat mode or something and that is why he is taking off without your team after the objective has been completed. If that's not the case, you can use a bit of scripting in some triggers to force the pilot to stay on the ground until your squad is in the helicopter. You can do this a variety of ways, but one of my favorites is to get the helicopter to land and when the waypoint is complete I use the flyInHeight command set to 0 to pin the helicopter to the ground, then I use a trigger that fires when all living members of the squad are in the helicopter to reset the helicopter's flyInHeight to whatever altitude I need and then he flies off. I've had good success with this in the past, but sometimes I have to ghetto rig it with a transport unload waypoint to get the helicopter to actually land (even though it's empty of cargo at the time), but hey, it works.

Share this post


Link to post
Share on other sites

Mynok, your solutions are something I'm going to try to use for more reliable helicopter behavior in general.

One problem with the loiter waypoint is that it just moves on to the next waypoint after the loiter waypoint instead of waiting.

I think it might be because of the fact I try to get a second unit loading into the helicopter in the field. I read somewhere that when a new group is given a get in command, the helicopter is assigned to that group. Maybe that's causing the odd behavior.

Share this post


Link to post
Share on other sites

Mynock,

 

Thanks for the explanation. Im a noob to scripting. Can you detail your code for triggers and waypoints for a dedicated sever for attaining this? An example mission would be awesome.

 

Humbly,

 

One suggestion I can offer is to use the loiter waypoint instead of a cycle waypoint for the helicopter to remain on station. You can set the direction you want the helicopter to circle the area now; it's quite handy and might help solve your issue if it's related to the cycle waypoint somehow.

Also, make sure you set the helicopter's behavior to careless. It sounds like perhaps the pilot is still in combat mode or something and that is why he is taking off without your team after the objective has been completed. If that's not the case, you can use a bit of scripting in some triggers to force the pilot to stay on the ground until your squad is in the helicopter. You can do this a variety of ways, but one of my favorites is to get the helicopter to land and when the waypoint is complete I use the flyInHeight command set to 0 to pin the helicopter to the ground, then I use a trigger that fires when all living members of the squad are in the helicopter to reset the helicopter's flyInHeight to whatever altitude I need and then he flies off. I've had good success with this in the past, but sometimes I have to ghetto rig it with a transport unload waypoint to get the helicopter to actually land (even though it's empty of cargo at the time), but hey, it works.

Share this post


Link to post
Share on other sites

Mynok, your solutions are something I'm going to try to use for more reliable helicopter behavior in general.

One problem with the loiter waypoint is that it just moves on to the next waypoint after the loiter waypoint instead of waiting.

I think it might be because of the fact I try to get a second unit loading into the helicopter in the field. I read somewhere that when a new group is given a get in command, the helicopter is assigned to that group. Maybe that's causing the odd behavior.

You can use a trigger linked to the loiter waypoint so that the helicopter will not complete the waypoint until the trigger's condition is met. That will allow the helicopter to loiter until you complete whatever objective and then continue on it's route.

I don't typically use AI controlled squads in my missions, but the method of checking to see if each group is in the helicopter will probably still work and you can try using that to prevent the helicopter from leaving again until both squads are aboard. Don't overlook the assignAsCargo command, sometimes that can be used to manipulate the AI's behavior around vehicles.

I'm curious myself honestly, so if I get some time late tonight I might play around with what you're trying to do.

 

 

Mynock,

 

Thanks for the explanation. Im a noob to scripting. Can you detail your code for triggers and waypoints for a dedicated sever for attaining this? An example mission would be awesome.

 

Humbly,

I don't script for dedicated servers, you'll have to ask someone else.

Share this post


Link to post
Share on other sites

Yea, except see, when the Heli I guess thinks its assigned to the pilot squad, it flys away even at the beginning of the mission when your starting at base! so I am going to either try starting the player's squad inside the heli from the begining, or making the pilot squad join the player's squad when you land and "talk to them".

 

Basically, I'm making a "DART" team mission where your squad is responsible for flying to a downed helo (and/or immobilized tank, turned over hunter, etc for the purposes of my mission), try to repair it or blow it up if repair isnt possible, defend the area from any attack, then extract from the area, rescuing the blackfoot/slammer/hunter's crew. 

 

So basically my desired behaviour out of the heli (in this case the DART team flys in a Huron) is to drop the team off at the various objectives, provide overwatch via loiter with careless/open fire AI, land when the conditions are met, then pick up everyone (Dart + pilots/crewmen, whoever is being rescued) and fly to the next objective. Probably asking for alot out of the heli AI xD.

Share this post


Link to post
Share on other sites

One sure fire way to keep heli on ground until all members of squad boarded is to "pilot heli1 enablesimulation false;" after it lands.  Then reenable simulation once all units on board.  Pilot animations are frozen during this time, but nobody is usually watching pilot while boarding.  It kinda sucks, but it truly eliminates their tendency to take off and hover if they sense enemies about (even if set to CARELESS).  Heli AI is a bitch to control if any combat nearby.

Share this post


Link to post
Share on other sites

I appreciate the helpful sentiment but thats not what I'm having an issue with. It is mainly about helicopters acting weird when two groups are in play trying to get on board. One thing of note as well is the second squad on the ground had hold waypoints and such before the actual "Get in" waypoint, however whenI tested it out by playing as them, they ignore the waypoints and go straight to the "get in" waypoint, again hijacking the chopper from my squad, sitting 2 KM away at base with the heli on the ground at the base spooling up to go pick the second squad up when they are supposed to be waiting to transport my guys. They wont even let me get in in this case.

Share this post


Link to post
Share on other sites

I found this video tutorial to be the best for heli transport: 

 

Includes usage of "landat" command in waypoint,and  trigger conditions to guarantee heli waits until all *live* units on board, etc.

 

Things get more complicated when you have multiple groups and multiple choppers though.  Good luck.

Share this post


Link to post
Share on other sites

How would I do it for multiplayer then, if I may ask? That will at least get me started.

 

You can use a trigger linked to the loiter waypoint so that the helicopter will not complete the waypoint until the trigger's condition is met. That will allow the helicopter to loiter until you complete whatever objective and then continue on it's route.

I don't typically use AI controlled squads in my missions, but the method of checking to see if each group is in the helicopter will probably still work and you can try using that to prevent the helicopter from leaving again until both squads are aboard. Don't overlook the assignAsCargo command, sometimes that can be used to manipulate the AI's behavior around vehicles.

I'm curious myself honestly, so if I get some time late tonight I might play around with what you're trying to do.
 
 
I don't script for dedicated servers, you'll have to ask someone else.

Share this post


Link to post
Share on other sites

Yea I'm not sure how to get the loiter waypoint to wait until a trigger condition is met. I'm fiddling around with it in the editor but its just completing on its own

Share this post


Link to post
Share on other sites

Yea I'm not sure how to get the loiter waypoint to wait until a trigger condition is met. I'm fiddling around with it in the editor but its just completing on its own

Right click on the trigger, select the option for waypoint activation, then link the line with the loiter waypoint.

 

How would I do it for multiplayer then, if I may ask? That will at least get me started.

You can ask all you want, but I don't know the answer, so I can't help you... I don't do scripting for dedicated servers so I don't know what has to be changed, that's why I suggested asking someone else who does.

Share this post


Link to post
Share on other sites

Roger.

Right click on the trigger, select the option for waypoint activation, then link the line with the loiter waypoint.
 
You can ask all you want, but I don't know the answer, so I can't help you... I don't do scripting for dedicated servers so I don't know what has to be changed, that's why I suggested asking someone else who does.

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  

×