Jump to content

"Follow" task just stops working


Recommended Posts

I'm writing an "interceptor" Lua script, for air policing and such, and it works very inconsistently. What it does is it allows a pilot to fly up to an AI aircraft and perform an intercept signal (rock wings and/or flash external lights). This causes events that can be interacted with by the mission maker, but the default behavior is for the AI aircraft to "follow" the player aircraft. The script simply pushes a "Follow" task to the AI task stack.

This has turned out to work very inconsistently. I have had several situations where I've been testing it and it works. Then, suddenly, it just stops working. Pushing the task to the AI does nothing. There is o following at all. Nothing in the dcs.log.

I have not found any pattern to why this can suddenly stop working.

Does anyone have any ideas?

i7-3930K CPU @ 3.20GHz; 16Gb DDR3; GeForce GTX 1070; Windows 10; TM Warthog HOTAS

Link to comment
Share on other sites

Have you tried AI Task Set to see if it is more reliable? Does the AI have any other tasks?

Task set will wipe out the AI's route, but it should also eliminate any other tasks that may be causing a conflict. You can pass a new route to the AI via script if necessary as well.

Awaiting: DCS F-15C

Win 10 i5-9600KF 4.6 GHz 64 GB RAM RTX2080Ti 11GB -- Win 7 64 i5-6600K 3.6 GHz 32 GB RAM GTX970 4GB -- A-10C, F-5E, Su-27, F-15C, F-14B, F-16C missions in User Files

 

Link to comment
Share on other sites

28 minutes ago, Exorcet said:

Have you tried AI Task Set to see if it is more reliable? Does the AI have any other tasks?

Task set will wipe out the AI's route, but it should also eliminate any other tasks that may be causing a conflict. You can pass a new route to the AI via script if necessary as well.

Yes, I have tested setting the task instead and I don't see any difference. Also, the AIs I'm testing with are super simple, with a "Nothing" main task, and no Advanced Waypoint Actions"; just a simple route with a few waypoints. I have tested with just one or two waypoints and with a bit longer routes that end with a landing. Sometimes it works, sometimes not. Oftentimes it does works fine but when I test it later, having made other - unrelated - changes to the miz, it stops working and I'm unable to figure out a pattern. It's like it's just cursed or something. Voodoo 😄

I guess my questions are:

  • Are more people seeing this (Follow task unreliable from scripting)?
  • Might there be some dependency that can cause it to not have an effect, that I just haven't thought about?

i7-3930K CPU @ 3.20GHz; 16Gb DDR3; GeForce GTX 1070; Windows 10; TM Warthog HOTAS

Link to comment
Share on other sites

  • 3 weeks later...
  • Recently Browsing   0 members

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