• How does Garry's Mod remove entities.
    1 replies, posted
I could just be retarded... Anyway I know that every entity is held in a metatable, and you can simply "remove" said entity with a self:Remove(), but what is the contents of this Remove(). I can't figure out how to "remove" entities held in metatables in my own game, the secondary question would be how do I remove a metatable when I no longer want "x" entity to exist?
I think you're using the term metatable wrong, and I'm not sure what you mean instead. But I'm pretty sure that ent:Remove() is directly calling a Source engine function coded in C++, not Lua. [editline]10th October 2016[/editline] When the entity is removed, the Lua userdata ("metatable") [i]continues to exist[/i], but it becomes 'NULL' and IsValid will return false.
Sorry, you need to Log In to post a reply to this thread.