valid/invalid targets

Everything related to the code /
Tout ce qui touche au code
Post Reply
User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

valid/invalid targets

Post by zuzuf » Thu Sep 04, 2008 1:44 pm

I've just fixed a bug in unit code related to NoChaseCategory and *badTargetCategory variables.

I though badTargetCategory meant targets the unit can't attack ... but looking closer it's not the case ... it's NoChaseCategory that defines which targets we mustn't attack.

This leads to the question of the day:
how do we have to use *badTargetCategory variables ?
(cf http://www.unituniverse.com/tutorials/tadesign/)
=>;-D Penguin Powered

Doors
Posts: 114
Joined: Wed Jan 09, 2008 7:53 pm
Contact:

Re: valid/invalid targets

Post by Doors » Mon Sep 15, 2008 5:52 am

zuzuf wrote:I've just fixed a bug in unit code related to NoChaseCategory and *badTargetCategory variables.

I though badTargetCategory meant targets the unit can't attack ... but looking closer it's not the case ... it's NoChaseCategory that defines which targets we mustn't attack.

This leads to the question of the day:
how do we have to use *badTargetCategory variables ?
(cf http://www.unituniverse.com/tutorials/tadesign/)
I have been doing a lot of research on the units lately and my impression is that the whole target category stuff is kind of weird.


badtargetcategory - seems to indicate the category of enemy to ignore if another type is available to shoot at.

badtargetcategory = VTOL -> shoot at non air category first, the ground stuff until you run out, then shoot the aircraft.


nochasecategory - indicates not to pursue this category whether it is attacked for being in range or not.

nochasecategory = VTOL -> go ahead and shoot at planes if you want but do not move from your assigned area to pursue them. Your assigned area being a rally point or a patrol path.


wpri_badTargetCategory - the primary weapon is bad at shooting this category of enemy. other categories first, this one last.

wsec_badTargetCategory - the secondary weapon is bad at shooting this category of enemy. other categories first, this one last.

Categories can be -> AIR NOTAIR SUB NOTSUB VTOL NOWEAPON TANK - and many more I guess.
Don't just look at the future through a window.
Open a door and go there.
http://ta3d.freedoors.org
http://www.freedoors.org
http://baencd.freedoors.org

Post Reply

Who is online

Users browsing this forum: No registered users and 29 guests