UnitFindTarget callin?

UnitFindTarget callin?

Requests for features in the spring code.

Moderator: Moderators

Post Reply
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

UnitFindTarget callin?

Post by TheFatController »

I'm not sure how possible this would be to integrate with the current code however would it be possible to add a call-in where when a unit is looking for a target to attack it first calls:

UnitFindTarget() --> "unitID, unitDefID, teamID, engineTarget, validTargets"

Where validTargets is a table of enemy unitID's which are being assessed for targeting and engineTarget is what the engine would have chosen.

You could then either return engineTarget or perform some operations on validTargets to return a different preferred target or even return false to force hold fire.

This would allow you to do stuff like write your own priority code, and handle Neutral units which are neutral to certain teams only and many other things.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: UnitFindTarget callin?

Post by jK »

sounds like what "TargetWeight" (COB+LUS) does :x
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: UnitFindTarget callin?

Post by TheFatController »

jK wrote:sounds like what "TargetWeight" (COB+LUS) does :x
Problem there is editing every unit script and dealing with the undocumented cob aiming code rather than being able to apply blanket rules and behaviour via a single script.
Post Reply

Return to “Feature Requests”