Env texturetoggle
Jump to navigation
Jump to search

Template:Base point It allows you to change the textures on brush entities or overlays.
Entity Description
LightmappedGeneric
{
$basetexture "path/to/a/VTF/file/with/multiple/frames"
Proxies
{
ToggleTexture
{
ToggleTextureVar $basetexture
ToggleTextureFrameNumVar $frame
}
}
}
In order for env_texturetoggle to work properly, your overlay or at least one face of your brush must use a VMT material with the ToggleTexture proxy defined and pointing to an animated VTF file with at least two frames.
Such a VMT file could look like the one on the right.
AddOutput texframeindex # which will change the texture's frame index without needing this entity.brush and an env_texturetoggle named toggle whose target brush is brush, then we can use any of the following outputs on a func_button to toggle the texture for the brush. The second and third output have the same effect.Keyvalues
- Target Brush(es) (target) <targetname>
- Name of the brushes or info_overlays. All
ToggleTexturematerials on all entities (including sprites) matching the targetname will be affected.
Inputs
- IncrementTextureIndex <void>
- Increments target brush's current texture frame by one. In other words: switches to the next texture.
- SetTextureIndex <integer>
- Sets target brush's texture frame to the specified index.