• Deriving from a brush entity
    4 replies, posted
I've made my own .fgd to add custom entities to a map I'm making and made matching lua entities. I'm having problems trying to derive my brush entity from func_brush, I keep getting this error: [CODE]//this (shared.lua) ENT.Base = "func_brush" //leads to this ERROR: Trying to derive entity ent_loading_wall from non existant entity func_brush![/CODE] Anyone knows what I'm doing wrong?
[QUOTE=dreukrag;40949783]I've made my own .fgd to add custom entities to a map I'm making and made matching lua entities. I'm having problems trying to derive my brush entity from func_brush, I keep getting this error: [CODE]//this (shared.lua) ENT.Base = "func_brush" //leads to this ERROR: Trying to derive entity ent_loading_wall from non existant entity func_brush![/CODE] Anyone knows what I'm doing wrong?[/QUOTE] func_brush is an engine Entity. Lua has no idea what it is. You will have to remake it in lua. (but don't call it func_brush or else it will overwrite the actual func_brush entity and probably break lots of things.)
[QUOTE=vexx21322;40950066]func_brush is an engine Entity. Lua has no idea what it is. You will have to remake it in lua. (but don't call it func_brush or else it will overwrite the actual func_brush entity and probably break lots of things.)[/QUOTE] Do I really have too? Ain't there some gmod lua entity that I could use as a base? By the way, were can I find a list of GMOD entities?
scripted_ents.GetList() will return all entities registered with lua. You can see a lot of the engine entities with [url]https://developer.valvesoftware.com/wiki/List_of_entities[/url]
If you want a simple brush entity, you can use base_brush.
Sorry, you need to Log In to post a reply to this thread.