A way to remplace an texture by another with LUA ?
5 replies, posted
Hello , do you know a way to remplace an texture by another ?
Because i want to change the material of the hands of the viewmodel but i wont change the texture of the weapon (Only the hands) so i can't use :
[lua]
LocalPlayer():GetViewModel():SetMaterial(blah blah blah)
[/lua]
What i want to do (Example from crysis ) :
[IMG]http://extrem-team.com/crysis.gif[/IMG]
Pistol -> Same texture and model
Hands -> Same model but the texture changes.
[code]local mat, mat2
mat = Material( "the one you want to replace" )
mat2 = Material( "the one you want to replace it with" )
mat:SetTexture( "$basetexture", mat2:GetTexture( "$basetexture" ) )[/code]
Or something along those lines.
Thanks :smile:
Is it possible to do this to the world textures too? I remember seeing a video or something where someone (maybe garry?) did it with matproxy.
It was game-mount priority ?
It was something garry showed a while back - all textures in the world were replaced by a single ( in this case, scrolling ) texture.
It did not use this method afaik.
Sorry, you need to Log In to post a reply to this thread.