Console commands: Difference between revisions
No edit summary |
Lexus Alyus (talk | contribs) No edit summary |
||
| Line 3: | Line 3: | ||
you access the console by pressing "~" at any time |
you access the console by pressing "~" at any time |
||
==Console variable types== |
|||
There are five types of cvars: |
|||
=== boolean === |
|||
This type of variable represents a yes/no or on/off value. It can only be set to true or false. As shorthand, setting a boolean variable to 0 will set it to false, and setting it to anything non-zero will set it to true. |
|||
== integer == |
|||
This is an ordinary number without a decimal point. For example, 1 is an integer, but 1.2 is not. |
|||
== float == |
|||
This is an ordinary number that can have a decimal point. |
|||
== string == |
|||
This is a series of text characters enclosed in quotes: For example, "Felix loitered lecherously on the lot" is a string. If you removed the quotes around it, then it would not be a string. |
|||
If you need to use quotes inside a string, preface it with a backslash. |
|||
Are you "The One" of old? |
|||
would be written like this as a string: |
|||
"Are you \"The One\" of old?" |
|||
== color == |
|||
This type of variable is a series of three hexadecimal numbers representing the amounts of red, green, and blue (in that order) in a color. For example, pure red would be represented as "ff 00 00". As a shorthand, you can set a color variable with one of several color names, and the RGB values will be set for you. |
|||
== flag == |
|||
This type of variable mirrors a setting in dmflags or dmflags2. Setting its value will set the corresponding value in one of those variables, and getting its value will get the corresponding value from one of the other two variables. This is designed to make using dmflags easier, because you don't have to memorize any numbers. |
|||
* [[Button Commands]] |
* [[Button Commands]] |
||
Revision as of 11:18, 5 January 2004
Console Commands are used to alter the way ZDoom does something, such as changing the sound volume, changing DMflags, ect...
you access the console by pressing "~" at any time
Console variable types
There are five types of cvars:
boolean
This type of variable represents a yes/no or on/off value. It can only be set to true or false. As shorthand, setting a boolean variable to 0 will set it to false, and setting it to anything non-zero will set it to true.
integer
This is an ordinary number without a decimal point. For example, 1 is an integer, but 1.2 is not.
float
This is an ordinary number that can have a decimal point.
string
This is a series of text characters enclosed in quotes: For example, "Felix loitered lecherously on the lot" is a string. If you removed the quotes around it, then it would not be a string. If you need to use quotes inside a string, preface it with a backslash.
Are you "The One" of old?
would be written like this as a string:
"Are you \"The One\" of old?"
color
This type of variable is a series of three hexadecimal numbers representing the amounts of red, green, and blue (in that order) in a color. For example, pure red would be represented as "ff 00 00". As a shorthand, you can set a color variable with one of several color names, and the RGB values will be set for you.
flag
This type of variable mirrors a setting in dmflags or dmflags2. Setting its value will set the corresponding value in one of those variables, and getting its value will get the corresponding value from one of the other two variables. This is designed to make using dmflags easier, because you don't have to memorize any numbers.
This really needs to be cleaned up... so somebody that is more anal than i should fiddle around with it...