In this guide, you’ll learn how to make AI-controlled helicopters fly to a specific waypoint in your mission. Special thanks to Avarik for helping figure out this method. This guide will take into account that you are familiar with the CDK and will not be explaining basics.
Creating a Simple UserMission in the CDK
1) Once you have placed a Helicopter unit at your desired starting point, create a structure type "dummy_immortal" class object to where you want the helicopter to move towards.
2) Now create a Trigger, have the Events element set as "periodicEvent" time as "0".
3) Create an Action "unitLoadBehTree", objects as the Helicopter unit, loadType set as "tree" and name as "missionHitThePoint".
4) Create another Action "unitMoveTo", object as the Helicopter, target as the Waypoint Object ("dummy_immortal"), set move_type to "move" and click the box for "horizontalDirectionForTeleport".
There you have it, now the AI controlled helicopter won't flip and dive into the ground anymore :D - Again special thanks to Avarik!




This really works, Thank you so much @Avarik. This will open new possibilities for me as a creator.
I do not have a advanced knowledge about CDK, Can you please guide that what is this BehTree and what other things can be achieved?
Hey, sorry that I saw this only now, but generally speaking, "behTree" stands for Behavior Tree, it tells the AI what sort of functions it should perform based on the Behavior Tree.
For example, it's possible to make a level bomber do dive bombing.
Some units come with a default tree or one programmed in the unit file itself, but these can be overidden with the loadBehTree action in the mission editor.
You can reach out to me privately and I'll provide you with more details.