Jump to content

How do I make AI hold position?


skypickle

Recommended Posts

I have 2 AI support choppers that I want to be able to command to stop following their waypoints and orbit as well as to resume their orbit through the F10 menu.

 

This is what I have so far but is incomplete and cannot get it to work:

TWO helicopters each with several waypoints.

WAYPOINTS 0 and 1 along the choppers route have these Advanced (WAYPOINT ACTIONS)

 ORBIT          Condition FLAG 91 is checked              Stop Condition FLAG 92 is checked

 

THEN I have these triggers

TRIGGER: MISSION START     NAME: CHOPPERS ORBIT
         ACTIONS: RADIO ITEM ADD FOR COALITION BLUE     NAME: Choppers orbit   FLAG: 91    VALUE: 1
                  SET FLAG VALUE                                               FLAG: 92    VALUE: 0

TRIGGER: MISSION START     NAME: CHOPPERS RESUME
         ACTIONS: RADIO ITEM ADD FOR COALITION BLUE     NAME: Choppers resume  FLAG: 91    VALUE: 0
                  SET FLAG VALUE                                               FLAG: 92    VALUE: 1

 

Do I need to have another trigger that is a switched condition that checks for the flags and does something?

I tried to make such a trigger with the ACTION for GROUP AI OFF but I cannot select the choppers.

4930K @ 4.5, 32g ram, TitanPascal

Link to comment
Share on other sites

Hi, see attached example.

I have used "Triggered Actions" (next tab to Payload) instead of "Waypoint actions".

When heli is out of trigger zone it wil initialize the orbit task.

Hit comm menu and choose 'Resume' then 'Orbit' and so on - the secret here is to reset the flags and radio items.

The only issue is that when is resuming, it will go straight to landing point instead of following designated waypoints.

Anyway, i think is a good example to start, just adapt it to your needs.

Hope it helps 🙂

heli-orbit-test.miz

Link to comment
Share on other sites

@dark_woodok thank you. Yeah after 'resume' he just flies east. And that's with the latest update in the open beta that came out today. That's a non starter. The helo has a rescue mission and I want it to hang out at a specific waypoint until ordered to proceed to the next waypoint. According to this:

https://wiki.hoggitworld.com/view/Mission_Editor:_AI_Tasking

If I select engage task instead of perform task, the helo should resume its track. However, engage task is not available as a triggerred action.

 

4930K @ 4.5, 32g ram, TitanPascal

Link to comment
Share on other sites

Skypickle,

You might try adding a Triggered Action to switch to the next waypoint, activated by the resume flag. 

Very Respectfully,

Kurt "Yoda" Kalbfleisch

London

"In my private manual I firmly believed the only time there was too much fuel aboard any aircraft was if it was fire." --Ernest K. Gann

 

Link to comment
Share on other sites

On 5/19/2022 at 3:30 AM, skypickle said:

...That's a non starter. The helo has a rescue mission and I want it to hang out at a specific waypoint until ordered to proceed to the next waypoint...

Hi, as tested by @dark_wood the orbit task used with "triggered actions" doesn't resume route, so you can't use it to order the "orbit" exactly when you want. It should be doable with script (storing group datas and calling them when resuming route, with distinction of already passed wpts) but big workload just for that.

Your only option, as I can test, is using "orbit" at waypoint, using for example radio "orbit at next wpt" and "resume route". It works well but if you want to do it "right" (meaning : you can cancel order, and conditions of all wpt orbits are different, so if you ask orbit after passing some wpts, the AI doesn't go back to do all previous orbits...) it still need a bunch of triggers.

Example .miz attached.

 

On 5/19/2022 at 1:52 PM, Yoda967 said:

Skypickle,

You might try adding a Triggered Action to switch to the next waypoint, activated by the resume flag. 

I have tested that, and if I'm not wrong or messed up the test, as the AI immediately goes RTB when triggered orbit is over, the switch to wpt is ignored.


Edited by toutenglisse
removed .miz
Link to comment
Share on other sites

6 hours ago, Yoda967 said:

Skypickle,

You might try adding a Triggered Action to switch to the next waypoint, activated by the resume flag. 

Switched waypoint does not work. The chopper will only orbit. It seems once that task is in the queue, any additional task gets back burnered.. I even tried putting a command (group resume) in the activation tab (propeller symbol) of the unit's property page and invoking that script with an AI push action. However, I can get the chopper to follow me if I put a 'follow' instruction in the activation tab. But that's not really what rescue helos do-they need to follow their track and when they encounter the rescue site, a script of that waypoint executes to make them land.

4930K @ 4.5, 32g ram, TitanPascal

Link to comment
Share on other sites

@toutenglisse yes your mission file works. finally i can see the light. but only after a lot of flags. Still it would be nice to be able to tell the chopper to orbit whereever it is (not waypoint dependent) - like a HOLD command. Didnt the mission editor have that at one point?

 

Hello, ED?

 

 

4930K @ 4.5, 32g ram, TitanPascal

Link to comment
Share on other sites

14 hours ago, skypickle said:

...Still it would be nice to be able to tell the chopper to orbit whereever it is (not waypoint dependent) - like a HOLD command...

For that, only option is to wait for "orbit" task activated by "triggered actions" to be fixed (route resumed when over instead of RTB).

Too bad that helicopters can't use aerobatics, because aerobatics used with a plane can solve what you want to achieve. (example attached)

Test-orbit-here-resume-plane.miz

Link to comment
Share on other sites

On 5/20/2022 at 12:19 AM, skypickle said:

...but only after a lot of flags...

I figured out that I greatly overcomplicated the "solution", missing a simple logic. In fact just set all wpt action "orbit" the exact same way, with only a stop flag condition (flag 1 false) and then only 3 triggers are needed to cycle the radio items (1 for item at start, 1 for item order orbit, 1 for item resume flight).

This way you can create as many wpt as needed, to get a "close" distance between orbit order and effective orbit, with minimal work. example attached.

@skypickle EDIT : if you want to try, find in this post a very simple scripted solution/example for "orbit here / resume flight" issue :

 

Test-orbit-resume.miz


Edited by toutenglisse
in post
  • Like 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...