$definevariable: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Linked variable to Wikipedia page)
m (Added a few notes)
Line 2: Line 2:


{{note|Variables do not work within "quote blocks"!}}
{{note|Variables do not work within "quote blocks"!}}
{{note|Variables do not work within macros either. You can pass the data on to the macro by using it as a token when running it.}}
{{note|If you define the same variable twice, the compiler will use the first one it finds and drop the second one.}}


This command is a 'lite' version of [[$definemacro]].
This command is a 'lite' version of [[$definemacro]].

Revision as of 21:42, 4 August 2019

The $definevariable QC command creates a Wikipedia icon variable. The variable's name, if surrounded by $s, will be substituted by its value whenever encountered.

Note.pngNote:Variables do not work within "quote blocks"!
Note.pngNote:Variables do not work within macros either. You can pass the data on to the macro by using it as a token when running it.
Note.pngNote:If you define the same variable twice, the compiler will use the first one it finds and drop the second one.

This command is a 'lite' version of $definemacro.

Example

$definevariable baseFile "fighter1"

$sequence attack $baseFile$_Attack
$sequence run $baseFile$_Run
$sequence idle $baseFile$_Idle