IMaterial.SetMaterialString

From GMod Wiki

Jump to: navigation, search
Function
Syntax Material:SetMaterialString( String VMTString, String Value )
Description:
Sets the specified VMT string on the material
Returns: nil
In Object: Material
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=IMaterial.SetMaterialString]IMaterial.SetMaterialString [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionCreates the texture pp/blurx and sets the background to the regular RT Camera (pp/rt). Note that this will not affect pp/blurx anywhere else, and will not affect pp/rt at all.
Used onNewerClient.png
Code
local mat = Material("pp/blurx");
mat:SetMaterialString("$basetexture","pp/rt");
Outputmat now contains the contents of the RT Camera, blurred on the x axis.


See also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox