Brush Entity Last edited 1 month ago2024-02-20 00:34:15 UTC

Brush entities are one of the two types of entity. A brush entity is comprised of one or more brushes, and thus are entities that either define an area or make up some part of the level geometry. This includes doors, elevators, trains, buttons and more, as well as areas that trigger some element of game logic, such as causing damage to the player or activating other entities when the player enters them.

Brush entities have a few properties of interest that are only defined geometrically (not through entity keyvalues): Some other properties applicable to brush entities in common (via various means): Compiler keyvalues with no effect on entity's function:
💡 If you want, you can edit your FGDs to expose the common properties above to all brush entities. One easy way is to extend the ZHLT BaseClass since most brush entities inherit it in most FGDs.
Advanced property: model
In the .map file format, everything is fundamentally part of an entity. Brush entities are entities that have brushes. World brushes are actually brushwork for the worldspawn entity.

During compilation, the brushwork of entities are compiled into brush models (there can be 512 of these) and divorced from the resulting entity lump which now holds pure entity data. In return, the entities get assigned a model keyvalue which points to the index into the BSP file's brush model list. Multiple entities sharing this value will share the same brush model and this can be set up with the zhlt_usemodel keyvalue. It can even point to an external BSP file e.g. models/healthbox.bsp or an actual model e.g. models/prop/door.mdl (note: models use different kind of collision and thus absent if used like this). There doesn't seem to be a way to explicitly set model value in the editor short of redefining the FGDs, and such edits are usually done with post-compile tools like bspguy.

Comments

You must log in to post a comment. You can login or register a new account.