Page 1 of 1
GlobalLOS w/o seeing cloaked units
Posted: 23 Apr 2010, 09:05
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.
Re: GlobalLOS w/o seeing cloaked units
Posted: 23 Apr 2010, 18:36
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?
Re: GlobalLOS w/o seeing cloaked units
Posted: 23 Apr 2010, 20:13
by trepan
Spring.SetUnitLosMask() and
Spring.SetUnitLosState()
can be used to setup "selective" global LOS.
Re: GlobalLOS w/o seeing cloaked units
Posted: 23 Apr 2010, 22:08
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.
Re: GlobalLOS w/o seeing cloaked units
Posted: 23 Apr 2010, 22:37
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
Re: GlobalLOS w/o seeing cloaked units
Posted: 24 Apr 2010, 14:48
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?).
Re: GlobalLOS w/o seeing cloaked units
Posted: 24 Apr 2010, 17:16
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.
Re: GlobalLOS w/o seeing cloaked units
Posted: 24 Apr 2010, 17:24
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.