Team Spartan Cookies & Milk Forums
Using entity:setSubMaterial() - Printable Version

+- Team Spartan Cookies & Milk Forums (https://teamscm.co.uk)
+-- Forum: Garry's Mod (https://teamscm.co.uk/forum-4.html)
+--- Forum: Starfall (https://teamscm.co.uk/forum-7.html)
+--- Thread: Using entity:setSubMaterial() (/thread-936.html)



Using entity:setSubMaterial() - Alanzote - 24-05-2015

How do I use the entityConfusedetSubMaterial() function in starfall?


RE: Using entity:setSubMaterial() - Person8880 - 24-05-2015

Find the material you want to replace from
--This is a table of all materials the entity has.
local Materials = Ent:getMaterials()
Then set the sub material by taking the index - 1, e.g.
--Replace the first sub-material with cmats/light
EntConfusedetSubMaterial( 0, "cmats/light" )



RE: Using entity:setSubMaterial() - Alanzote - 24-05-2015

Thanks Person!