New Weapon tdf tag - Page 2

New Weapon tdf tag

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Uberleechen
Posts: 36
Joined: 22 Nov 2006, 23:48

Post by Uberleechen »

Doesn't commandfire=1 mean that things only shoot once per order to attack? (Eg. nukes)

If so, then bombers would not circle around to bomb the target you have designated (unless I'm just off my rocker. If so please feel free to denigrate me as you please.).
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Bombers aren't neccessarily "fire and forget" weapons.
User avatar
smartie
NOTA Developer
Posts: 146
Joined: 23 Jun 2005, 19:29

Post by smartie »

Sorry to bring back an old post, but has anyone gotten this to work? I was trying out a recent build and this tag doesn't seem to do anything. It sounds like fighters should completely ignore ground targets if all their weapons are set to canAttackGround=0;

I set the tag and put both of their weapons as toairweapon=1; but fighters still swoop down at peewee's and stuff, even though they don't fire their missiles.
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Post by Guessmyname »

canAttackGround simply stops units firing that weapon when directly ordered to (in FPS mode or outside of it). It doesn't prevent units shooting at ground targets by it's own.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Ground refers to the terrain here, i.e. an attack order on unoccupied terrain.
User avatar
smartie
NOTA Developer
Posts: 146
Joined: 23 Jun 2005, 19:29

Post by smartie »

Ah, I misunderstood. This would be a nice thing to have though. As it is there's no good way to prevent fighters from going after ground units.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

There's onlyTargetCategory for that right?
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Was there a tag for an exception like target everything but this group?
User avatar
smartie
NOTA Developer
Posts: 146
Joined: 23 Jun 2005, 19:29

Post by smartie »

onlyTargetCategory doesn't affect fighters. They will still sloop down at units and act like they are trying to attack them.
I've also tried NoChaseCategory=NOTAIR; and that doesn't affect them either.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

NoChase means they won't go after them.

A solution would be to add to everything which isn't a ground unit NOTGROUND as category and set onlyTargetCategory to NOTGROUND.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Tobi wrote:There's onlyTargetCategory for that right?
It gets ignored for me when I try to set it for the whole unit, only per-weapon works.
User avatar
Fanger
Expand & Exterminate Developer
Posts: 1509
Joined: 22 Nov 2005, 22:58

Post by Fanger »

Rattle it doesnt matter what you do to fighters they will still attempt to attack targets, even if their weapons cant fire at them, and they are ordered not to chase that.. least in the current version..
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Post by yuritch »

KDR_11k wrote:It gets ignored for me when I try to set it for the whole unit, only per-weapon works.
OnlyTargetCategory is a per-weapon tag (e.g. there is a OnlyTargetCategory1, OnlyTargetCategory2, ..., OnlyTargetCategory16, but no OnlyTargetCategory). But, when applied to fighters, it doesn't work properly: the fighter properly cannot fire at units outside of its OnlyTargetCategory, but it still tries to attack them (it makes attack runs, dives at ground units, but fires no shots). This messes up some of my setups. I want fighters to have so high CruiseAlt that they are out of reach of light AA weapons, but when executing those useless dives at ground units, they come into range of everything.
User avatar
Fanger
Expand & Exterminate Developer
Posts: 1509
Joined: 22 Nov 2005, 22:58

Post by Fanger »

Thats not a mess up Yuritch, by Target, it means can fire, so that tag really should read onlyfireatcatagory.. the fighters will still target that, in fact any unit will act this way with this tag, not just fighters, usually however nochase catagory sorts this out, however for fighters this does not apply..
Post Reply

Return to “Engine”