Jump to content

How to loop the waypoints of AI (ships, land)?


Recommended Posts

I wanted to have the Carriers steam up and down the coast in an eternal loop. Googled and found this from 2013:

Add a task, and then pick the category "Perform Command" then choose "switch waypoint". Set whichever waypoint you want the AI to go back to, whenever they reach teh waypoint with the command, they will go back to the WP specified.

https://forums.eagle.ru/showthread.php?t=111541

"switch waypoint" doesn't exist anymore it seems.

Intel Core i7 3630QM @ 2.40GHz (Max Turbo Frequency 3.40 GHz) | 16.0GB Dual-Channel DDR3 @ 798MHz | 2047MB NVIDIA GeForce GT 635M | 447GB KINGSTON SA400S37480G (SATA-2 (SSD))

Link to comment
Share on other sites

I have not tested this, but i think this should work:

On the last waypoint of your carrier, open up the "advanced (waypoint actions)", then for TYPE choose "Perform Task", and for ACTION choose "go to waypoint". The "To Waypoint" value lets you choose the waypoint the carrier should go next. It will then go to that waypoint and perform all tasks and routes as it would be the first time for the carrier to reach that waypoint.

 

Here a YT video, this is for ground units, but it should work for carriers too:

Link to comment
Share on other sites

The "go to waypoint" option doesn't exist for the Carrier. It does exist for vehicles (and it works, made a loop with some APC).

 

I don't have the "Combined Arms" if that matters.

 

For Carrier, under "Perform Command" there's choices of "Run Script" and "Script File". Maybe there's a backway there. But there should be a simple "go to waypoint".

Intel Core i7 3630QM @ 2.40GHz (Max Turbo Frequency 3.40 GHz) | 16.0GB Dual-Channel DDR3 @ 798MHz | 2047MB NVIDIA GeForce GT 635M | 447GB KINGSTON SA400S37480G (SATA-2 (SSD))

Link to comment
Share on other sites

Here a YT video, this is for ground units, but it should work for carriers too:

 

First half of this video is silly unless I miss something. He adds "go to waypoint" for all waypoints. That's redundant, it goes to next waypoint by default. He only needed to add one "go to waypoint" to go from last to first.


Edited by -0303-

Intel Core i7 3630QM @ 2.40GHz (Max Turbo Frequency 3.40 GHz) | 16.0GB Dual-Channel DDR3 @ 798MHz | 2047MB NVIDIA GeForce GT 635M | 447GB KINGSTON SA400S37480G (SATA-2 (SSD))

Link to comment
Share on other sites

I wanted to have the Carriers steam up and down the coast in an eternal loop. Googled and found this from 2013:

"switch waypoint" doesn't exist anymore it seems.

 

Hi,

load mist_4_3_74.lua Script at Mission Start.

on the last carrier waypoint -> advanced waypoint action -> perform command -> run script -> mist.ground.patrol('NAME-OF-CARRIER-GROUP')

 

you can download the latest MIST from:

https://github.com/mrSkortch/MissionScriptingTools -> (mist_4_3_74.lua)

  • Like 1
Link to comment
Share on other sites

  • 2 months later...
Hi,

load mist_4_3_74.lua Script at Mission Start.

on the last carrier waypoint -> advanced waypoint action -> perform command -> run script -> mist.ground.patrol('NAME-OF-CARRIER-GROUP')

 

you can download the latest MIST from:

https://github.com/mrSkortch/MissionScriptingTools -> (mist_4_3_74.lua)

 

hi, I have tried what you explained but the ship comes to a stop at it last waypoint, not sure what went wrong...

Link to comment
Share on other sites

  • 1 month later...

I am looking for an answer to this also. Trying to set up CSG protection in PG, want to have a naval unit patrolling, but. I can't find a way to set it to repeat waypoints, other than placing hundreds of waypoints on top of eachother.

 

And I will execute vengeance in anger and fury upon the heathen, such as they have not heard.

                                                                                                                 Micah 5:15

Link to comment
Share on other sites

  • 8 months later...

I was having trouble with this but managed to figure it out.  

The mist script line you need is as follows

 

mist.ground.patrol('group_name', way point type, formation type, speed)

 

as an example 

 

mist.ground.patrol('Naval-1', turning, default, 25)

 

The speed parameter can accept either a hard value as above or "default".  
The same should be for formation type (for ships this is the template drop down?) But I am not sure so I am using default for now.

Ship only get the turning for the way point type so that is hard set.

In the group name it has to match exactly and you need the apostrophes at the start and end of the name.  (<- for the people who are fledglings like me) 

 

Tested it on a speed boat with time accel.  Hope this helps.

 

Link to comment
Share on other sites

  • 10 months later...
  • Recently Browsing   0 members

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