Talk:List of material proxies: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 4: Line 4:
Does the LampBeam proxy really exist? I get: "Error: Material "effects/ray02" : proxy "LampBeam" not found!" when trying to use it. A solution if you're looking to hide flat geometry light effects is making the material fade when the player gets near:
Does the LampBeam proxy really exist? I get: "Error: Material "effects/ray02" : proxy "LampBeam" not found!" when trying to use it. A solution if you're looking to hide flat geometry light effects is making the material fade when the player gets near:


//Variables


----
"$param" 0.3


"$playerdistance" 0.0


//Proxy variables
"$param" 0.3
"$playerdistance" 0.0
"$alpha_unclamped" 0.0
"$alpha_unclamped" 0.0
//Fade when player gets near
//Fade when player gets near
"Proxies"
"Proxies"
{
{
"PlayerProximity"
"PlayerProximity"
{
{
"resultVar" "$playerdistance"
"resultVar" "$playerdistance"
}
}
"Subtract"
"Subtract"
{
{
"srcVar1" "$playerdistance"
"srcVar1" "$playerdistance"
"srcVar2" "$param"
"srcVar2" "$param"
"resultVar" "$alpha_unclamped"
"resultVar" "$alpha_unclamped"
}
}
"Clamp"
"Clamp"
{
{
"min" 0.0
"min" 0.0
"max" 1.0
"max" 1.0
"srcVar1" "$alpha_unclamped"
"srcVar1" "$alpha_unclamped"
"resultVar" "$alpha"
"resultVar" "$alpha"
}
}
}
}
--[[User:Fewes|Fewes]] 14:44, 16 September 2010 (UTC)

Revision as of 07:44, 16 September 2010

How to do a water who change color fog, with use a button in game? Thx. --Anarkia777 18:10, 27 July 2010 (UTC)

Use a material_modify_control. --TomEdwards 20:13, 27 July 2010 (UTC)

Does the LampBeam proxy really exist? I get: "Error: Material "effects/ray02" : proxy "LampBeam" not found!" when trying to use it. A solution if you're looking to hide flat geometry light effects is making the material fade when the player gets near:

//Variables

"$param" 0.3

"$playerdistance" 0.0

"$alpha_unclamped" 0.0

//Fade when player gets near

"Proxies" {

"PlayerProximity"

{

"resultVar" "$playerdistance"

}

"Subtract"

{

"srcVar1" "$playerdistance"

"srcVar2" "$param"

"resultVar" "$alpha_unclamped"

}

"Clamp"

{

"min" 0.0

"max" 1.0

"srcVar1" "$alpha_unclamped"

"resultVar" "$alpha"

}

}

--Fewes 14:44, 16 September 2010 (UTC)