Brush Entity Last edited 3 months ago2024-09-05 14:55:51 UTC

You are viewing an older revision of this wiki page. The current revision may be more detailed and up-to-date. Click here to see the current revision of this page.
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
During compilation, the brushwork of entities are compiled into brush models (there can be 512 of these) and the raw brushwork data removed. 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. Also, the incompatible collision mode will crash the game when it checks for it.)

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.

1 Comment

Commented 8 months ago2024-04-18 14:33:31 UTC Comment #106136
My FGD's ZHLT BaseClass is like this:
fgd
@BaseClass = ZHLT
[
    zhlt_lightflags(choices) : "ZHLT Lightflags" : 0 =
    [
        0 : "Default"
        1 : "Embedded Fix"
        2 : "Opaque (blocks light)"
        3 : "Opaque + Embedded fix"
        6 : "Opaque + Concave Fix"
    ]
    light_origin(string) : "Light Origin Target"
    zhlt_hull1(target_destination) : "info_hullshape (standing)"
    zhlt_hull2(target_destination) : "info_hullshape (big monsters)"
    zhlt_hull3(target_destination) : "info_hullshape (crouching)"
    zhlt_usemodel(target_destination) : "ZHLT Template Model Target"
    zhlt_copylight(target_destination) : "ZHLT Copy Lighting From Target"
    zhlt_noclip(choices) : "ZHLT No-clipping" : "" =
    [
        "" : "Default clipping"
        1 : "No clip"
    ]
    zhlt_invisible(choices) : "ZHLT Invisibility" : "" =
    [
        "" : "Default (visible)"
        1 : "Invisible"
    ]
    zhlt_customshadow(string) : "ZHLT custom shadow (Alpha/RGB)" : : "Float value that specifies opacity of this brush entity. 0.0 (opaque) -> 1.0 (no shadow). Enter three values for RGB."
    zhlt_embedlightmap(choices) : "ZHLT embed lightmap" : "" =
    [
        "" : "No"
        1 : "Yes"
    ]
    zhlt_embedlightmapresolution(choices) : "ZHLT embed lightmap resolution" : "" =
    [
        "" : "[UNSET]"
        1  : "1 "
        2  : "2 "
        4  : "4 "
        8  : "8 "
        16 : "16"
        32 : "32"
        64 : "64"
    ]
    skin(choices) : "Contents" : "" =
    [
        ""  : "[UNSET]"
        -1  : "Empty"
        -2  : "Solid"
        -3  : "Water"
        -4  : "Slime"
        -5  : "Lava"
//        -6  : "Sky"
        -15 : "Translucent"
        -16 : "Ladder"
        -17 : "Fly field"
        -18 : "Gravity fly field"
        -19 : "Fog"
    ]
]

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