CompileLadder: Difference between revisions
(Created page with "Compiles the texture as a '''ladder''' texture, meaning your texture will behave the same as the tools/ladder. Example: LightmappedGeneric { $basetexture developer/custom...") |
SirYodaJedi (talk | contribs) No edit summary |
||
(13 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
Compiles | {{DISPLAYTITLE:%CompileLadder}}{{subpage|[[Material map compile flags]]}} | ||
Compiles brushes textured with this material as having '''ladder''' [[Contents flags|contents]], meaning players will be able to climb up it. In some games, the material should be applied to a [[func_ladder]] brush entity in order for the navigation mesh to recognize it and to allowing [[NPC]]s to climb the ladder.<br> | |||
Materials with this flag are visible to players, unless [[%compilenodraw]] is also used. All ladders found so far also make use of [[%compilepassbullets|%CompilePassBullets]], as this function is not inherited by %CompileLadder already. | |||
{{note|Due to how contents flags work, giving a brush ladder contents will cause all faces of the brush to be climbable. | |||
{{workaround|In {{css}}{{inline note|name=And others games?}} if only one brush face is desired, you can add the <code>ladder</code> $surfaceprop to a material which will make only that brush face climbable.}} }} | |||
===Examples=== | |||
'''tools/ToolsInvisibleLadder.vmt''' is a ladder that is not visible to players. | |||
<source> | |||
"LightmappedGeneric" | |||
{ | |||
"$basetexture" "Tools/toolsinvisibleladder" | |||
"%compilenodraw" 1 | |||
"%compilepassbullets" 1 | |||
"%compileladder" 1 | |||
"%keywords" "airexchange,borealis,c17downtown,c17industrial,c17sewers,c17skyscraper,c17trainstation,combine,kraken,wasteland" | |||
}</source> | |||
An improved version that does not cut visleaves would look like so: | |||
<source> | |||
"LightmappedGeneric" | |||
{ | |||
"$basetexture" "Tools/toolsinvisibleladder" | |||
"$translucent" 1 | |||
"%compileladder" 1 | |||
"%compiledetail" 1 | |||
"%compilenodraw" 1 | |||
"%compilepassbullets" 1 | |||
}</source> | |||
'''Metal/MetalLadder001a.vmt''' is visible to players. | |||
<source>"LightmappedGeneric" | |||
{ | |||
"$basetexture" "Metal/metalladder001a" | |||
"$surfaceprop" "metal" | |||
"%compileladder" 1 | |||
"$alphatest" 1 | |||
"%compilepassbullets" 1 | |||
}</source> | |||
'''{{l4dseries}}Tools/Climb_Versus.vmt''' is only visible to infected players, due to the proxies. | |||
<source> | |||
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 | |||
resultVar $proxTeam | |||
} | |||
Subtract | |||
{ | |||
srcVar1 $one | |||
srcVar2 $proxRange | |||
resultVar $alpha | |||
} | |||
Multiply | |||
{ | |||
srcVar1 $alpha | |||
srcVar2 $proxTeam | |||
resultVar $alpha | |||
} | |||
TextureScroll | |||
{ | |||
texturescrollvar $baseTextureTransform | |||
texturescrollrate 1 | |||
texturescrollangle 90.00 | |||
} | |||
} | |||
}</source> | |||
[[Category:Material System]] | [[Category:Material System]] | ||
[[Category: | [[Category:Shader parameters]] |
Latest revision as of 17:24, 24 March 2025
Compiles brushes textured with this material as having ladder contents, meaning players will be able to climb up it. In some games, the material should be applied to a func_ladder brush entity in order for the navigation mesh to recognize it and to allowing NPCs to climb the ladder.
Materials with this flag are visible to players, unless %compilenodraw is also used. All ladders found so far also make use of %CompilePassBullets, as this function is not inherited by %CompileLadder already.

Examples
tools/ToolsInvisibleLadder.vmt is a ladder that is not visible to players.
"LightmappedGeneric"
{
"$basetexture" "Tools/toolsinvisibleladder"
"%compilenodraw" 1
"%compilepassbullets" 1
"%compileladder" 1
"%keywords" "airexchange,borealis,c17downtown,c17industrial,c17sewers,c17skyscraper,c17trainstation,combine,kraken,wasteland"
}
An improved version that does not cut visleaves would look like so:
"LightmappedGeneric"
{
"$basetexture" "Tools/toolsinvisibleladder"
"$translucent" 1
"%compileladder" 1
"%compiledetail" 1
"%compilenodraw" 1
"%compilepassbullets" 1
}
Metal/MetalLadder001a.vmt is visible to players.
"LightmappedGeneric"
{
"$basetexture" "Metal/metalladder001a"
"$surfaceprop" "metal"
"%compileladder" 1
"$alphatest" 1
"%compilepassbullets" 1
}
Tools/Climb_Versus.vmt is only visible to infected players, due to the proxies.
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
resultVar $proxTeam
}
Subtract
{
srcVar1 $one
srcVar2 $proxRange
resultVar $alpha
}
Multiply
{
srcVar1 $alpha
srcVar2 $proxTeam
resultVar $alpha
}
TextureScroll
{
texturescrollvar $baseTextureTransform
texturescrollrate 1
texturescrollangle 90.00
}
}
}