• Spawning brushes with LUA
    7 replies, posted
How can I spawn a custom brush that I have created and be able to set the texture, height, width and depth.
You can't unless you make a SENT for it.
I have, I've created a custom brush that removes all props in it. I just need to know how to spawn it with LUA at map load.
Well you could spawn it with ents.Create("SENT NAME HERE") [url]http://wiki.garrysmod.com/?title=Ents.Create[/url] and on a hook using this [url]http://wiki.garrysmod.com/?title=Gamemode.Initialize[/url]
If you don't know, don't fucking reply and pretend you know anything about it. You can't create brushes in-game, period. The only thing you can do is spawn brush entities which use the same geometry as another brush entity which already exists in the map, and that's not what you need. If you want your brush to be there since the beginning, the only way to do that is to add it in your map using Hammer, whenever you turn a block into a brush entity, just enter the name of your custom brush in the combo box instead of selecting one of the existing brush entities.
[QUOTE=KillerLUA;23938736]I have, I've created a custom brush that removes all props in it. I just need to know how to spawn it with LUA at map load.[/QUOTE] Maybe this [url]http://wiki.garrysmod.com/page/GM/PostCleanupMap[/url] ? [editline]21st April 2015[/editline] [QUOTE=KillerLUA;23937220]How can I spawn a custom brush that I have created and be able to set the texture, height, width and depth.[/QUOTE] 5 years ago)) [url]https://forums.alliedmods.net/showthread.php?t=129597[/url] ?
[QUOTE=clazstudio;47567965]Maybe this [url]http://wiki.garrysmod.com/page/GM/PostCleanupMap[/url] ? [editline]21st April 2015[/editline] 5 years ago)) [url]https://forums.alliedmods.net/showthread.php?t=129597[/url] ?[/QUOTE] The hook isn't really relevant to when I would of needed the brush to be created, and the second article only applies to Source C++ modding unfourtunetly.
[QUOTE=KillerLUA;47568293]The hook isn't really relevant to when I would of needed the brush to be created, and the second article only applies to Source C++ modding unfourtunetly.[/QUOTE] What did you end up doing?
Sorry, you need to Log In to post a reply to this thread.