waterweapon targeting seaplane/hover/amphibious

waterweapon targeting seaplane/hover/amphibious

Various things about Spring that do not fit in any of the other forums listed below, including forum rules.

Moderator: Moderators

Post Reply
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

waterweapon targeting seaplane/hover/amphibious

Post by Caydr »

I've got a torpedo launcher, and I want it to only target units in the water, obviously.

To accomplish this, I say onlytargetcategory and rule out anything that's not:
-a water-only unit
-a hovercraft
-a seaplane
-an amphibious tank

Problem is, now it will target hovers or amphibious while they're on land, and make a sincere effort to shoot down seaplane fighters using torpedoes. So I set the weapon type to waterweapon.

Here's my question. Is Spring smart enough to realize that hovers, amphibious units, and seaplanes DO become acceptable targets for waterweapons while they're on/in the water?
User avatar
Spawn_Retard
Posts: 1248
Joined: 21 Dec 2006, 14:36

Re: waterweapon targeting seaplane/hover/amphibious

Post by Spawn_Retard »

in b4 Learn2lua.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Re: waterweapon targeting seaplane/hover/amphibious

Post by Caydr »

I know, let's use LUA instead of built-in features, that seems efficient.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: waterweapon targeting seaplane/hover/amphibious

Post by imbaczek »

option 1) let's use LUA instead of built-in features, that seems efficient.
option 2) wait for code gods to bring features to the people
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: waterweapon targeting seaplane/hover/amphibious

Post by Kloot »

Is Spring smart enough
The meaning of waterweapon is "if true, this weapon can target and shoot at underwater stuff", so yes.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Re: waterweapon targeting seaplane/hover/amphibious

Post by Caydr »

Yes I get that but I wonder if the engine bothers to check on whether a unit is currently underwater or if it just has a waterline tag. I know there are lots of examples where shortcuts like that have been taken in the past because it would be too wasteful to do constant checks on every unit's position.

Maybe I'll just test it, I have a bit more time to spare today than I usually do.
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Re: waterweapon targeting seaplane/hover/amphibious

Post by yuritch »

In my experience engine actually checks if the unit is underwater (or in water). It's easy to see - when a ground unit gets into water, subs start firing at it. When the same unit is on the ground near water, subs don't try to torpedo it.
So hovers would never be targeted as they always remain above water (can be changed with little model edit).
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: waterweapon targeting seaplane/hover/amphibious

Post by KDR_11k »

If your torp launcher shoots land units it's either not a torp launcher or it has submissile=1 set. The TorpedoLauncher weapon will not shoot at land.
Post Reply

Return to “General Discussion”