Buta Posted Sunday at 10:19 AM Posted Sunday at 10:19 AM I know that AI helos in the Player group will just stay on the ground until the player takes off. But how can I get a whole AI group of helos to wait until certain conditions are met, and then take off? Especially wait on ground after cold start. I know I can make them spawn in air then land and wait, but...it doesn't look...smooth...so... I've given these a shot, and none of them seem to work: 1) I set the option - Prefer Take Off/Land Vertically to false, and then put an obstacle on the taxiway. 2) I set Embarking at way point 0, trying to make it wait for the troops. If anyone's got any ideas, I'd be really thankful if they'd share 'em.
Buta Posted Sunday at 02:56 PM Author Posted Sunday at 02:56 PM I've figured out a workaround: right after the helicopter spawns, use the trigger "Set Internal Cargo On Unit" as quickly as possible to add some weight to it. The weight shouldn't be too large, but it needs to exceed the takeoff load. In ME, set WP1 very close to WP0 and set the "Perform Task - Land" action to the position where you want it to wait on the ground, along with setting the "On land" duration. Then the helicopter will stay on the ground with its engine running and wait. It might even keep its cargo door open. If you want to end the waiting state and take off, just set the takeoff condition in the "Condition" section and remember to remove the extra weight. By the way, the extra weight may prevent the helicopter from performing the "Embarking" task properly.
kira_mikamy Posted 11 hours ago Posted 11 hours ago Alright, if you want to achieve this without using scripts and only through the Mission Editor's triggers, I recommend posting in the Mission Editor section of the forum to get more precise answers. That said, I haven't used triggers in a long time myself — I prefer scripting with things like MOOSE — but I believe you can achieve something similar using the "Triggered Actions" tab (on the right side of the group’s settings) when you select the helicopter. Set a task as "Land", then click on "Stop Condition". In these stop conditions, you can specify something like "when Flag X is true". Now, create a trigger that fires after 1 second using "AI Task Push", and select the "Land" task you just created. Then, set Flag X to activate when one of the pilots takes off, so the helicopter will stop the "Land" task and continue with its flight plan. Side effect: At the beginning of the mission, the helicopter will take off, but after 1 second it will be ordered to land at the point you defined in the "Land" task. If you don't strictly need the aircraft to stay on the ground from mission start, and it's acceptable for it to take off for 20 seconds before landing, this can work. 1
Buta Posted 7 hours ago Author Posted 7 hours ago (edited) 3小时前,kira_mikamy说: Alright, if you want to achieve this without using scripts and only through the Mission Editor's triggers, I recommend posting in the Mission Editor section of the forum to get more precise answers. I'm open to using scripts, but every time I use the script "controller:setTask()" to create a "Land" task, no matter how I set it, even if I use the same table structure as in the "mission" file, it will ultimately cause the game to crash. 3小时前,kira_mikamy说: Set a task as "Land", then click on "Stop Condition". In these stop conditions, you can specify something like "when Flag X is true". Set a task as "Land", then click on "Stop Condition". In these stop conditions, you can specify something like "when Flag X is true". 将任务设置为“着陆”,然后点击“停止条件”。在这些停止条件中,你可以指定诸如“当标志X为真时”之类的条件。 Now, create a trigger that fires after 1 second using "AI Task Push", and select the "Land" task you just created. Now, create a trigger that fires after 1 second using "AI Task Push", and select the "Land" task you just created. 现在,使用“AI任务推送”创建一个1秒后触发的触发器,并选择你刚刚创建的“登陆”任务。 Then, set Flag X to activate when one of the pilots takes off, so the helicopter will stop the "Land" task and continue with its flight plan. Thanks for your answer. It has provided me with some inspiration. 3小时前,kira_mikamy说: Side effect: At the beginning of the mission, the helicopter will take off, but after 1 second it will be ordered to land at the point you defined in the "Land" task.Side effect: At the beginning of the mission, the helicopter will take off, but after 1 second it will be ordered to land at the point you defined in the "Land" task.副作用: 在任务开始时,直升机将起飞,但1秒后它将接到命令,在“着陆”任务中你定义的地点降落。 If you don't strictly need the aircraft to stay on the ground from mission start, and it's acceptable for it to take off for 20 seconds before landing, this can work. The workaround I mentioned above actually achieved a similar effect, but the drawback is that the AI can't stay on the ground waiting from the beginning. An urge makes it have to randomly move or rotate a certain distance, which is not good. The uncertain movement will make it impossible to place static objects or units around it to create some "pre - battle preparation" scenarios. I hope there can be a way, or ED can create an option to make it not execute the waypoints so urgently after the engine starts or after a hot spawn. Edited 7 hours ago by Buta
Recommended Posts