$contents: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
Line 6: Line 6:
  $contents "<content_type_1>" "<content_type_2>" "<content_type_3>"
  $contents "<content_type_1>" "<content_type_2>" "<content_type_3>"


* The current content_types you can use are:
* Available content_types are:
; <code>grate</code>: Makes it be a grate (not solid to bullets, solid to everything else)
; <code>grate</code>: Makes it a grate  
; <code>monster</code>: Makes it be marked as an NPC
: Grates are not solid to bullets or [[LOS|Line of Sight]], solid to everything else)
; <code>notsolid</code>: Makes it be not solid to anything
; <code>monster</code>: Marks it as an NPC
; <code>solid</code>: Makes it be solid (usually useful only for the [[$jointcontents]] command to make a solid child of a non-solid parent)
; <code>notsolid</code>: Makes it not solid to anything
; <code>ladder</code>: Make it be a ladder  
; <code>solid</code>: 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.
; <code>ladder</code>: Make it a ladder  


=== Example ===
=== Example ===
  $contents "monster" "grate"
  $contents "monster" "grate"
==See Also==
* [[CollisionProperty]]




[[Category:QC Commands]]
[[Category:QC Commands]]

Revision as of 08:35, 9 April 2008

The QC command $contents specifies a list of the content_types to use for contents-mask 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.

Syntax

$contents "<content_type_1>" "<content_type_2>" "<content_type_3>"
  • Available content_types are:
grate
Makes it a grate
Grates are not solid to bullets or Line of Sight, solid to everything else)
monster
Marks it as an NPC
notsolid
Makes it not solid to anything
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
Make it a ladder

Example

$contents "monster" "grate"

See Also