GlobalLOS w/o seeing cloaked units

GlobalLOS w/o seeing cloaked units

Requests for features in the spring code.

Moderator: Moderators

Post Reply
SpikedHelmet
MC: Legacy & Spring 1944 Developer
Posts: 1948
Joined: 21 Sep 2004, 08:25

GlobalLOS w/o seeing cloaked units

Post by SpikedHelmet »

Is there any command or function that exists that is essentially globallos except it doesn't reveal cloaked enemy units? While cloaked units "appear" cloaked they are detected by units. Do not want.
SpikedHelmet
MC: Legacy & Spring 1944 Developer
Posts: 1948
Joined: 21 Sep 2004, 08:25

Re: GlobalLOS w/o seeing cloaked units

Post by SpikedHelmet »

Update: Boo globallos!

Other requests/enquiries:

1) Decloakradius does not work correctly. If an enemy unit is within the decloakradius of your unit (or vice versa) but your unit is not within the sightdistance of it (or any other unit) it will not decloak. So for instance if your tank has decloakradius of 500 and there are enemy units with sightdistance 250 around it, it won't decloak if they're within 500 but rather they need to get at least one within 250. This may not seem like a problem at first (what does it matter if it decloaks or not if you don't have LOS on it?) but it infact does, as we're trying to base something off the cloak/decloak function.

2) Is there a way to disable the "make geometry appear translucent/ghost when cloaked" feature? I want cloaked units to appear (to the owning player/allies) completely normal and non-ghosted (but ofc still invisible to the enemy when cloaked)

3) Unrelated to cloaking, is there an easy way for a lua script to detect when units fire besides an actual call-out from the script of that unit?
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Re: GlobalLOS w/o seeing cloaked units

Post by trepan »

Spring.SetUnitLosMask() and
Spring.SetUnitLosState()
can be used to setup "selective" global LOS.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: GlobalLOS w/o seeing cloaked units

Post by lurker »

LOS/radar/jammer use what each unit can reach, I don't see why decloak should be different. What are you doing that you want the decloak distance to be based on the cloaked unit's definition?

Doesn't globallos also do terrain and particles?

Getweaponstate, I guess.



Side note, the cloaking system needs an overhaul anyway, units should not become visible for everyone because they were spotted.
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: GlobalLOS w/o seeing cloaked units

Post by CarRepairer »

lurker wrote:Side note, the cloaking system needs an overhaul anyway, units should not become visible for everyone because they were spotted.
http://trac.caspring.org/browser/trunk/ ... ecloak.lua
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: GlobalLOS w/o seeing cloaked units

Post by KDR_11k »

Just use the Lua LOS callouts, they're what I used for the Gundam smoke grenades (those are in the current release, right?).
User avatar
Nemo
Spring 1944 Developer
Posts: 1376
Joined: 30 Jan 2005, 19:44

Re: GlobalLOS w/o seeing cloaked units

Post by Nemo »

To be clear, what happens right now is that a unit with decloak radius of 700 can be only 400 elmos away from an enemy unit, but if that enemy unit has only 200 LoS, the cloaked unit remains cloaked. If this is intended behavior?


We'll probably end up using the los mask stuff, I was just hoping to avoid reimplementing all of the cloaking behavior (running get enemies in cylinder every few seconds on all the units in the game/tracking when all armed units last fired, etc). I know this last one could be easily done with lua unit scripts, but converting all of ours over to lua is a project we're leaving until after the upcoming release.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: GlobalLOS w/o seeing cloaked units

Post by KDR_11k »

Nemo wrote:To be clear, what happens right now is that a unit with decloak radius of 700 can be only 400 elmos away from an enemy unit, but if that enemy unit has only 200 LoS, the cloaked unit remains cloaked. If this is intended behavior?
Yeah, it is, lurker patched it in because blind units kept decloaking stuff.
Post Reply

Return to “Feature Requests”