This article's documentation is for anything that uses the Source engine. Click here for more information.

$contents

From Valve Developer Community
Jump to: navigation, search

$contents is a QC command available in all Source Source games. It specifies a list of the contents types to use for SolidMask tests during non-hitbox traces.

  • This feature was specifically added to allow us to make things like fences out of props instead of brush models.
  • See also $jointcontents.

Example

$contents "monster" "grate"

Available contents types are:

grate
Makes it a grate.
Grates are not solid to bullets or line of sight, but solid to everything else.
Icon-Bug.pngBug:Does not function correctly in Team Fortress 2Counter-Strike: SourceCounter-Strike: Global Offensive; see %CompilePassBullets for specifics.
monster
Marks it as a monster[Why?], better known in Source as an NPC.
notsolid
Makes it not solid to anything.
Nonsolid cannot be combined with any other contents flags.
solid
Makes it solid.
Solid is the default value, so this parameter is usually used only for the $jointcontents command, to make a solid child of a non-solid parent.
ladder
Makes it a ladder.
Whether a prop ladder is actually climbable is dependent upon the game; see Working Ladders.

Additional contents from 🖿bspflags.h can be set via Source Model Skin Editor Source Model Skin Editor, although results may vary.

See also