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?
waterweapon targeting seaplane/hover/amphibious
Moderator: Moderators
- Spawn_Retard
- Posts: 1248
- Joined: 21 Dec 2006, 14:36
Re: waterweapon targeting seaplane/hover/amphibious
in b4 Learn2lua.
Re: waterweapon targeting seaplane/hover/amphibious
I know, let's use LUA instead of built-in features, that seems efficient.
Re: waterweapon targeting seaplane/hover/amphibious
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
option 2) wait for code gods to bring features to the people
Re: waterweapon targeting seaplane/hover/amphibious
The meaning of waterweapon is "if true, this weapon can target and shoot at underwater stuff", so yes.Is Spring smart enough
Re: waterweapon targeting seaplane/hover/amphibious
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.
Maybe I'll just test it, I have a bit more time to spare today than I usually do.
Re: waterweapon targeting seaplane/hover/amphibious
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).
So hovers would never be targeted as they always remain above water (can be changed with little model edit).
Re: waterweapon targeting seaplane/hover/amphibious
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.