Dynamic ball of light

xingped

L1: Registered
Jan 3, 2010
5
0
Hey everyone, I'm having some trouble figuring out what to do and would appreciate some help: how can I create a dynamic light that is basically a free-floating sphere of light (I'm guessing I may need two, one up one down)?
 

henke37

aa
Sep 23, 2011
2,075
515
Try a sprite.
 

Seba

DR. BIG FUCKER, PHD
aa
Jun 9, 2009
2,364
2,728
Env_sprites are often used to make the visible light, like the flashing red some mappers like to put on the cameras. As for the actual light, just a light entity will do.
 
T

The Asylum

I don't know if it'll work as a sprite, but you cold try a custom sprite texture that fades in/out relative to distance, IE the respawn room no entry texture.

When I created one of my own proximity-sensitive textures, all I did was copypasta the the VMT data from the no entry brush into a new VMT

"LightmappedGeneric"
{
"$basetexture" "yourfolder/yourtexture"
"$translucent" 1

"$playerdistance" "0"
"$distanceclamped" "0"
"$distanceinverted" "0"
"$teammatch" "0"
"$matchinverted" "0"
"$endalpha" "0"
"$one" "2"
"$fadedistance" "1600" (modify this to control when your texture fades)
$distancealpha 1

"Proxies"
{
"PlayerProximity"
{
"resultVar" "$playerdistance"
"scale" 1.0
}
"Clamp"
{
"srcVar1" "$playerdistance"
"min" "0"
"max" "$fadedistance"
"resultVar" "$distanceclamped"
}
"Subtract"
{
"srcVar1" "$fadedistance"
"srcVar2" "$distanceclamped"
"resultVar" "$distanceinverted"
}
"PlayerTeamMatch"
{
"resultVar" "$teammatch"
}
"Subtract"
{
"srcVar1" "$one"
"srcVar2" "$teammatch"
"resultVar" "$matchinverted"
}
"Divide"
{
"srcVar1" "$distanceinverted"
"srcVar2" "$fadedistance"
"resultVar" "$endalpha"
}
"Multiply"
{
"srcVar1" "$endalpha"
"srcVar2" "$matchinverted"
"resultVar" "$alpha"
}
}
}