When issuing a ship's weapons the "targetWeapon" command, the ship will inmediately target those weapons to the given target, but the minute it fires it will find an other target and so on.
For the past weeks I've been working on a very versatile AI of my making, completely mod-free and with plenty of functionality, except for that annoying problem that really messes with the concept of a "smart" ai, where each ship will concentrate their fire and not just firing to the first thing that crosses their crosshairs...
So, anyone knows a why to force a ship to ONLY fire their weapons at an specific target?
Specially using the TargetWeapons command (the tFireTo one doesn't always work)
And if that solution doesn't involve re-aiming the same weapon after it finishes firing it'd be best...
What I tried and didn't work:
-disabling the AI (messes up with movement and default commands)
-Using forbid flags (weapons won't fire or will not use the weapons properly)
-using the tFireTo command (only works at times, and it doesn't let you fire two purposes at the same time (device disabling and hull damaging, in example)
-setting all ships under the ai in focused focused Behaviour (didn't change a thing)
I've included my AI, to use it, all you have to do is include it inside your mission inside a machine, like this:
Machine "AI"
#include "defaultAI.mach"
END
The usage is explained inside the file, but it basically has 3 states: Battle, CleanUp and Update.
Battle is the initial state, it should only be called in first instance or after you've called the CleanUp one. Use the Update state if you want to let the AI know new ships have arrived.