Clavus/SWEP_Construction_Kit

(question) Removing sprites

Opened this issue · 2 comments

Hi Clavus, you can remove a model from a table on the fly using something like
if CLIENT then for _, v in pairs( self.WElements ) do if v.modelEnt and IsValid(v.modelEnt) then v.modelEnt:Remove() end end end
But is it possible to remove sprites in a similar fashion?

Looking at the base code, sprite materials are stored in v.spriteMaterial. So simply do v.spriteMaterial = nil and it should disappear.

Thanks, i'll check it out.