$include: Difference between revisions
Jump to navigation
Jump to search
Note:The new QC is always loaded relative to the current QC's directory - it is not affected by $pushd or $cd!
Tip:Compiled MDL files can also be included with $includemodel.
No edit summary |
No edit summary |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{tabsBar|main=gs|base=$include}} | |||
{{this is a|QC command|name=$include}} It's used to insert the contents of another <code>.qc</code> (or <code>.qci</code>, for clarity) file as though they were part of the parent file. | |||
{{note|The new QC is always loaded relative to the current QC's directory | {{note|The new QC is always loaded relative to the current QC's directory - it is '''not''' affected by [[$pushd]] or [[$cd]]!}} | ||
{{tip|Compiled [[MDL]] files can also be included with [[$includemodel]].}} | {{tip|Compiled [[MDL]] files can also be included with [[$includemodel]].}} | ||
Line 9: | Line 10: | ||
When the included file is in the same folder as the current one: | When the included file is in the same folder as the current one: | ||
$include "ragdoll.qci" | |||
Latest revision as of 21:12, 18 July 2025
$include
is a QC command available in all Source games. It's used to insert the contents of another
.qc
(or .qci
, for clarity) file as though they were part of the parent file.


Example
When the included file is in the same folder as the current one:
$include "ragdoll.qci"