If I remove a target from another ship in the middle of a complex battle (ie. a battle where there is more than 1 ship on the players side -- I'm sure there are even more complex scenarios, but that will do for the moment!), will that ship then automatically find another target, or do I need to force the AI to do a search for another target?
Also, can I remove a target from another ship's potential list of targets. So, if I remove a target from a ship, how do I stop that ship from re-acquiring the same target again?
Removing target and setting target on other ship
Moderators: winston, another_commander
Re: Removing target and setting target on other ship
Removing the current target will send the ship a target lost event, which will cause it to re-evaluate its AI, which will usually cause it to acquire a new target from its list of known hostiles.phkb wrote:If I remove a target from another ship in the middle of a complex battle (ie. a battle where there is more than 1 ship on the players side -- I'm sure there are even more complex scenarios, but that will do for the moment!), will that ship then automatically find another target, or do I need to force the AI to do a search for another target?
Also, can I remove a target from another ship's potential list of targets. So, if I remove a target from a ship, how do I stop that ship from re-acquiring the same target again?
If you want to make it harder for it to reacquire the same target as before, you'll also need to do
ship.removeDefenseTarget(oldTarget);
Events during the battle are likely to add it back at some point however, unless the removed target ceases firing on allied (non-player) ships.