CompileTeam: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(modified text a bit to make it easier to understand)
m (SirYodaJedi moved page %compileteam to %CompileTeam)
(No difference)

Revision as of 13:55, 22 May 2023

Compiles the texture to only affect a specific team. For example, the climb texture is a ladder that only lets infected climb up it.
However, making a texture visible to only one team requires Proxies. As seen in the example below.

Todo: Does it work only in Left 4 Dead 2?

Example:

UnlitGeneric
{
	$basetexture "tools\climb"
	$additive 1
	"%compileTeam" 2
	"%compilepassbullets" 1
	"%compileladder" 1

	$proxRange 0.0
	$proxTeam 1.0
	$one 1.0
	
	Proxies
	{
		PlayerTeam
		{
			team 3 //Note: "%compileTeam" and this "team" use different numbers. Because that's just how it is coded.
			resultVar $proxTeam
		}
		Subtract
		{
			srcVar1 $one
			srcVar2 $proxRange
			resultVar $alpha
		}
		Multiply
		{
			srcVar1 $alpha
			srcVar2 $proxTeam
			resultVar $alpha
		}
		TextureScroll
		{
			texturescrollvar $baseTextureTransform
			texturescrollrate 1
			texturescrollangle 90.00
		}
	}
}