Setinfo: Difference between revisions
Jump to navigation
Jump to search
Note:The variables are not limited to numbers. You can store words, too.
(Created page with "'''<code>setinfo</code>''' is a console command that creates a new console variable. The variable and its value will be preserved across map loads, and (possibly to your downf...") |
Thunder4ik (talk | contribs) m (→See also: Unicodifying, replaced: See Also → See also) |
||
(8 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{this is a|console command|name=setinfo}} | |||
'''<code>setinfo</code>''' is a console command that creates a new console variable. The variable and its value will be preserved across map loads, and (possibly to your downfall) game saves. There doesn't seem to be a way to mark one as a cheat. | '''<code>setinfo</code>''' is a console command that creates a new console variable. The variable and its value will be preserved across map loads, and (possibly to your downfall) game saves. There doesn't seem to be a way to mark one as a cheat. | ||
==Syntax== | ==Syntax== | ||
Line 8: | Line 7: | ||
If you wanted to make a variable to count how many NPCs you kill, you could type <code>setinfo mykills 0</code>. (Or you can set it to any impressive number ;) ) | If you wanted to make a variable to count how many NPCs you kill, you could type <code>setinfo mykills 0</code>. (Or you can set it to any impressive number ;) ) | ||
{{note| | <code>mykills</code> would become a variable just like anything else, such as {{ent|sv_pure}}. | ||
{{note|The variables are not limited to numbers. You can store words, too.}} | |||
====Convar VAR is already registered but not as user info value==== | |||
If you see this in the console, it means you tried to set a console variable that already exists, such as {{ent|sv_cheats}}. | |||
==See | ==See also== | ||
*{{ent|incrementvar}}, a command | *{{ent|incrementvar}}, a convenient command for counting things. |
Latest revision as of 12:49, 8 January 2024
setinfo
is a console command available in all Source games.
setinfo
is a console command that creates a new console variable. The variable and its value will be preserved across map loads, and (possibly to your downfall) game saves. There doesn't seem to be a way to mark one as a cheat.
Syntax
setinfo VAR VALUE
If you wanted to make a variable to count how many NPCs you kill, you could type setinfo mykills 0
. (Or you can set it to any impressive number ;) )
mykills
would become a variable just like anything else, such as sv_pure.

Convar VAR is already registered but not as user info value
If you see this in the console, it means you tried to set a console variable that already exists, such as sv_cheats.
See also
- incrementvar, a convenient command for counting things.