SetTextureFrameIndex(): Difference between revisions
Jump to navigation
Jump to search
Confirm:Does this work on models and sprites?
SirYodaJedi (talk | contribs) No edit summary |
SirYodaJedi (talk | contribs) mNo edit summary |
||
Line 2: | Line 2: | ||
In most games, only {{ent|env_texturetoggle}} uses this function. {{hls|2}} uses this function to indicate whether [[func_healthcharger|health stations]] and [[func_recharge|HEV chargers]] have juice left or not. | In most games, only {{ent|env_texturetoggle}} uses this function. {{hls|2}} uses this function to indicate whether [[func_healthcharger|health stations]] and [[func_recharge|HEV chargers]] have juice left or not. | ||
{{todo|Example code | {{todo|Example code (perhaps by re-implementing [[func_wall]]'s texture toggling from GoldSrc?)}} | ||
{{confirm|Does this work on models and sprites?}} | {{confirm|Does this work on models and sprites?}} | ||
[[Category:Programming]] | [[Category:Programming]] | ||
[[Category:C++]] | [[Category:C++]] |
Revision as of 22:06, 13 September 2024
SetTextureFrameIndex is a C++ function available for the CBaseEntity class in all Source games. It takes one input, an integer. It sets the texture frame of all materials with the ToggleTexture to the specified integer.
In most games, only env_texturetoggle uses this function. Half-Life: Source uses this function to indicate whether health stations and HEV chargers have juice left or not.
Todo: Example code (perhaps by re-implementing func_wall's texture toggling from GoldSrc?)
