$qcassert

From Valve Developer Community
Revision as of 15:09, 25 June 2018 by Practical Problems (talk | contribs) (Create page for $qcassert)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

$qcassert is a QC command which will stop a model from compiling if a condition is not what it is expected to be.

Todo: Which Source games other than Counter-Strike: Global Offensive support this?

Syntax

$qcassert <condition> <arguments> <bool>

If the result of the condition is not equal to the boolean specified, the compile will fail, informing the user of the result of the assert.

Currently, there are only 2 conditions, which both take the bone name as their sole argument:

  • boneexists
  • importboneexists
Todo: What is the difference?

Example

$qcassert boneexists "whatifgaming" false

If there is a bone in the model named whatifgaming, compiling will cease. Otherwise, the model will compile as normal.


See also