[Tutorial] Creating brush entities
1st i'd like to thank foxmulder for reminding me about entity outputs otherwise i never would have bothered trying to get brushes to work.
i've only tested this in css but it should work for any game, most brush entities can be found here http://developer.valvesoftware.com/w...Brush_Entities. not all brush entities will work for different games. please note any brush entities that are created will be invisible as only bsp brush models can be used with brush entities. only box shaped brushes work. heres part of a snippet i used PHP Code:
m_vecMins and m_vecMaxs set the dimensions of the bounding box, they are local coordinates of the entity e.g 0,0,0 will be the entities origin i.e world coordinates of the entity. in my above snippet the box is 200 by 200 by 200. you must set the m_fEffects prop to have the ef_nodraw flag or clients will be spammed with errors in the conole every gameframe for each entity you create that doesn't have the flag. in css i've tested func_buyzone, trigger_hurt, trigger_push and func_conveyor, certain entities might not work you'll have to try for yourself. you can addoutputs to the entities and hook the output so you can call a function whenever the output is fired. e.g you could have a trigger_once/trigger_multiple thats fires a blank output that is hooked, this will allow you to run code on whoever triggered the output. some brush entities would require some kind of visual so you know its there like func_conveyor, since you can't apply models to the brushes you could spawn a prop_dynamic, make it non solid(depending on what brush entity you're using) and parent it to the brush and set the brush bounds to the same as the model. this way you can spawn working doors, switches, moving platforms and rotating props. that should be useful for sandbox mods and fun stuff, in css you could create a bomb zone anywhere allowing players to plant c4 where ever they want. |
Re: [Tutorial] Creating brush entities
I've been wondering how to do this for a while.
Thanks! :crab::crab::crab: |
Re: [Tutorial] Creating brush entities
Good job dude
How did you figure it out? |
Re: [Tutorial] Creating brush entities
thanks, over the years i've spent a lot of time in the source sdk and on valves wiki checking out different entities. i know from experience that if someone says something isn't possible not to take their word for it. it takes time and patience to get certain things working. also i prefer to mess with things people wouldn't bother with.
|
Re: [Tutorial] Creating brush entities
How did you find out about the m_vecMins and m_vecMaxs?
|
Re: [Tutorial] Creating brush entities
i tested most netprops/dataprops over the years as i wanted to know what they did in case i ever needed them. the name gave some clue to what it did, you can use it to change the bounding box on any entity, be warned some entities will reset it r.g player bounding boxes are reset in one of the thinks, its resized depending on player movement e.g standing or crouching.
|
Re: [Tutorial] Creating brush entities
Always good to know that xD Also you can use SDKHooks' ThinkPost to change the bounding box on entitys like that.
|
Re: [Tutorial] Creating brush entities
Nice job, B!
|
Re: [Tutorial] Creating brush entities
Quote:
Without 'em, collision is not there, or it errors. |
Re: [Tutorial] Creating brush entities
hi guys ive been trying to learn how to mod. ive been following the valve tutorials at developer.valvesoftware.com/wiki. But I am stuck on the section that teaches you how to author a brush entity http://developer.valvesoftware.com/w...a_Brush_Entity
Apparently I dont have the triggers.h and triggers.cpp files which are needed for functions that allow you to play with brush entities. So basically I can't program my brush entities. So i was wondering is this tutorial like an alternative to teaching us how to program brush entities? |
All times are GMT -4. The time now is 10:03. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.