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
m (→‎Example: cdtexture, not cdtextures)
Line 14: Line 14:


==Example==
==Example==
'''$cd "."'''
<pre>
[[$modelname]] "weapons/shell.mdl"
'''$cd "."'''
[[$cdtexture]] "models/weapons/"
[[$modelname]] "shell.mdl"
[[$body]] "Shell" "shell.smd"
[[$cdtexture]] "models/weapons/shell"
[[$sequence]] "idle" "shell.smd"
[[$body]] "Shell" "shell.smd"
 
[[$sequence]] "idle" "shell.smd"
</pre>




[[Category:QC Commands|c]]
[[Category:QC Commands|c]]

Revision as of 10:44, 3 July 2023

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

Icon-Important.pngImportant: For 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]] "shell.mdl"
[[$cdtexture]] "models/weapons/shell"
[[$body]] "Shell" "shell.smd"
[[$sequence]] "idle" "shell.smd"