This article's documentation is for the "GoldSrc" engine. Click here for more information.

$cd (GoldSrc): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(still is used in goldsrc)
Line 1: Line 1:
{{Obsolete}}
{{goldsrc topicon}}
The deprecated [[QC command]] <code>'''$cd'''</code> was used to change the location at which SMD files and <code>[[$include]]</code>d QC files are looked for. '''It has been replaced by [[$pushd]] and [[$popd]].'''
{{goldsrc|only}} Used to set the current working directory for the QC script.
[[Category:QC Commands|c]]
 
{{modernImportant|Does not exist in {{src|4.1}}; starting directory is inferred to be QC file location, with [[$pushd]] and [[$popd]] being used to change the directory instead.}}
 
==Description==
 
$cd "path/to/files/"
 
The default working directory will be the folder of the .qc file.
 
==Parameters==
* The path should be a full or relative path on the file system.
 
==Example==
'''$cd "."'''
[[$modelname]] "weapons/shell.mdl"
[[$cdtextures]] "models/weapons/"
[[$body]] "Shell" "shell.smd"
[[$sequence]] "idle" "shell.smd"
 
 
 
[[Category:QC Commands]]

Revision as of 13:24, 26 June 2023

(only in GoldSrc) Used to set the current working directory for the QC script.

Icon-Important.pngImportant:Does not exist in Source Source; starting directory is inferred to be QC file location, with $pushd and $popd being used to change the directory instead.

Description

$cd "path/to/files/"

The default working directory will be the folder of the .qc file.

Parameters

  • The path should be a full or relative path on the file system.

Example

$cd "."
$modelname "weapons/shell.mdl"
$cdtextures "models/weapons/"
$body "Shell" "shell.smd"
$sequence "idle" "shell.smd"