So I’m drawing a sprite, and everything works well, but then upon attempting to use a different one that isn’t set up the same way, it doesn’t draw properly. (Not translucent, can’t be colored, etc)
What I’m trying to do is simply copy the material that renders the way I want it to, then edit the $basetexture to simply draw a different sprite instead, in the same fashion.
local copymat = Material( "sprites/light_glow02_add" ) copymat:SetTexture( "$basetexture", "particle/particle_ring_wave_7" )
(I’m not planning on using local for this once it works so don’t worry about optimization.)
This appears to work flawlessly at first… But my problem is that after doing this, ALL other instances of “sprites/light_glow02_add” are also replaced by the “particle/particle_ring_wave_7” sprite.
Essentially, I need a way to copy the material rather than replace or override it. There doesn’t seem to be a IMaterial:Copy or anything of the sort, so I’m not sure what to do.