Jump to content

Stop Condition Task


Winfield_Gold

Recommended Posts

I have a mission which involves 2 aircraft taking off after a flag is 'positive' and will follow my aircraft.  This works brilliantly, what I would like to achieve is that the 2 aircraft stop following me once I enter a zone radius over an airfield so that these 2 aircraft do not crash and burn, or lower their gear and keep following me.  

 

Is their an 'end follow task' script of some description that I can use or a lua script I can 'borrow' in order to end the follow task?

 

Thank you in advance for assistance.  

 

  

Link to comment
Share on other sites

3 hours ago, Winfield_Gold said:

I have a mission which involves 2 aircraft taking off after a flag is 'positive' and will follow my aircraft.  This works brilliantly, what I would like to achieve is that the 2 aircraft stop following me once I enter a zone radius over an airfield so that these 2 aircraft do not crash and burn, or lower their gear and keep following me.  

 

Is their an 'end follow task' script of some description that I can use or a lua script I can 'borrow' in order to end the follow task?

 

Thank you in advance for assistance.  

 

  

 

When you reach your zone, you can use "mist.goRoute" to immediately assign them a new Wpt (example : landing at their mainbase, using mist.fixedWing.buildWP).

Mission Scripting Tools Documentation - DCS World Wiki - Hoggitworld.com


Edited by toutenglisse
Link to comment
Share on other sites

1 hour ago, toutenglisse said:

 

When you reach your zone, you can use "mist.goRoute" to immediately assign them a new Wpt (example : landing at their mainbase, using mist.fixedWing.buildWP).

Mission Scripting Tools Documentation - DCS World Wiki - Hoggitworld.com

 

Thank you @toutenglisse, will using M.I.S.T engine conflict with ED if I released a 'free' campaign using the M.I.S.T scripts in my missions?  my query is, with ED's updates and using MIST....I am worried that the mist engine will not be compatible until the publisher of mist updates their lua engine to coincide with ED future releases.

 

in short....the VEAO Hawk saga where the developer were waiting on ED's updates to make their product function.  I was hoping for a fix that only relied on ED's mission editor, not a 3rd party work around.   

Link to comment
Share on other sites

9 minutes ago, Winfield_Gold said:

Thank you @toutenglisse, will using M.I.S.T engine conflict with ED if I released a 'free' campaign using the M.I.S.T scripts in my missions?  my query is, with ED's updates and using MIST....I am worried that the mist engine will not be compatible until the publisher of mist updates their lua engine to coincide with ED future releases.

 

in short....the VEAO Hawk saga where the developer were waiting on ED's updates to make their product function.  I was hoping for a fix that only relied on ED's mission editor, not a 3rd party work around.   

 

I would say no, no particular issues or conflicts to be expected. What can be an "issue" and that I've experienced in the past, is that sometimes some functions can evolve and need correction in a script to keep being functional, but in the exact same way a function or option in mission editor does evolve and also need correction.

 

All things done in mission editor are in fact scripts and can be displayed as scripts, and Mist uses DCS script functions to make other, more complex or extended functions from it and from lua functions.

 

Also Mist creators allow to use Mist with a campaign that you want to offer for money.

Link to comment
Share on other sites

On 5/7/2021 at 11:07 AM, Winfield_Gold said:

...Is their an 'end follow task' script of some description that I can use or a lua script I can 'borrow' in order to end the follow task?...

 

  

 

I was thinking for a scripted way to do that, but in your example the simple solution is the "execute AI task" action when the unit reach the zone (create the task to execute in "follower" AI's triggered actions : switch to landing waypoint).

  • Like 1
Link to comment
Share on other sites

Maybe I'm missing something here, but why would you want to use a script for this when this can easily be done without scripting.

 

- Once you enter the specific zone - create a trigger to set flag to "X"

- Set the AI 'follow task' stop condition to that same flag

Done

 

Or wasn't that what you meant?

  • Like 1

System specs:

 

i7-8700K @stock speed - GTX 1080TI @ stock speed - AsRock Extreme4 Z370 - 32GB DDR4 @3GHz- 500GB SSD - 2TB nvme - 650W PSU

HP Reverb G1 v2 - Saitek Pro pedals - TM Warthog HOTAS - TM F/A-18 Grip - TM Cougar HOTAS (NN-Dan mod) & (throttle standalone mod) - VIRPIL VPC Rotor TCS Plus with ALPHA-L grip - Pointctrl & aux banks <-- must have for VR users!! - Andre's SimShaker Jetpad - Fully adjustable DIY playseat - VA+VAICOM

 

~ That nuke might not have been the best of ideas, Sir... the enemy is furious ~ GUMMBAH

Link to comment
Share on other sites

@sirrah I used that concept 1st with a flag set once the player entered the zone.  However, the F-16's would follow to the zone, flag is active, then turn back and land at another base.  Or, They would not ignore the player get to waypoint and just turn back and land.   

 

That was why I asked here.  I have attached a very quick demo mission for reference using the Hornet and 2 AI F16's showing the issue. toutenglisse solved the problem though as above.

 

Maybe I was doing something wrong....maybe.   

 

My research pointed to anything in the 'stop condition' in the advanced waypoint makes the task void, Hence why I was stuck.

    

 

stop condition test.miz

Link to comment
Share on other sites

  • Recently Browsing   0 members

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