Air->Sub Torpedo firing on ground

Air->Sub Torpedo firing on ground

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
Yatta
Posts: 55
Joined: 13 Aug 2006, 17:18

Air->Sub Torpedo firing on ground

Post by Yatta »

Hi

I have an airplane (modified brawler) which has 2 weapons, the second weapon being a torpedo launcher.
My problem is that tough the weapon settings for the torpedo launcher on the unit fatures "OnlyTargetCategory2=UNDERWATER;" the plane still fires its torpedoes when attacking on ground. Is there a way to prevent that ?

Kisses :3
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Did you define UNDERWATER in the armor.txt? It's either that or... :?
User avatar
Yatta
Posts: 55
Joined: 13 Aug 2006, 17:18

Post by Yatta »

Dumb me.
I didnt understood it worked this way ...

But what about amphibious unit ? Wont it fire its torpedoes to amphibious units being classed "Underwater" when the units are out of water ?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

UNDERWATER would be in the category tag, not the armor.txt.

Of course it'll fire at units that are out of water. Spring doesn't check that.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Ah right my bad. Was certain it had to be defined in armor.txt as well but it doesn't.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6241
Joined: 29 Apr 2005, 01:14

Re: Air->Sub Torpedo firing on ground

Post by FLOZi »

Yatta wrote:Hi

I have an airplane (modified brawler) which has 2 weapons, the second weapon being a torpedo launcher.
My problem is that tough the weapon settings for the torpedo launcher on the unit fatures "OnlyTargetCategory2=UNDERWATER;" the plane still fires its torpedoes when attacking on ground. Is there a way to prevent that ?

Kisses :3
Do you measn when attacking units on the ground, or simply force attacking the ground?

The former indicates a problem, the latter is standard spring behaviour, which will be overrideable next version with the canAttackGround tag.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

look at the lvl 2 torp bomber in arm XTA, it fires torpedoes at ground targets.
User avatar
Yatta
Posts: 55
Joined: 13 Aug 2006, 17:18

Post by Yatta »

Ok thanks for the help everyone. At least I should be able to avoid firing torpedoes on non-amphibious units I guess.

Anyways thats not really a big problem since when it fires torpodoes on the ground, the torpedo doesnt reach the point the attack is aimed at, so its hard to use it as an efficient ground attack.
manored
Posts: 3179
Joined: 15 Nov 2006, 00:37

Post by manored »

Yatta wrote:Ok thanks for the help everyone. At least I should be able to avoid firing torpedoes on non-amphibious units I guess.

Anyways thats not really a big problem since when it fires torpodoes on the ground, the torpedo doesnt reach the point the attack is aimed at, so its hard to use it as an efficient ground attack.
With some skill you could make the torpedo hit on the right place... but its better to use the big bombers! :P
Saktoth
Zero-K Developer
Posts: 2665
Joined: 28 Nov 2006, 13:22

Post by Saktoth »

waterweapon is its own weapon category. It behaves like a dropped weapon out of water and a guided weapon under water.

If you put it on a amphib tank etc, the tank wont have this problem of firing it out of the water- because he cant hit anything with it (It would just roll out the end of his gun and tumble to the ground).

Its only because of the altitude of planes that they have this problem.
Post Reply

Return to “Game Development”