List of console scripting commands: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Added lang.)
No edit summary
 
(15 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{lang|Category:Core Console Commands}}
Commands commonly used in [[Developer console]] scripting.
Commands commonly used in the [[Developer console]] and in [[CFG]] scripting. The basic building blocks used to manipulate the other specific-purpose commands and variables. For example, {{ent|alias}} can be used to make primitive [https://en.wikipedia.org/wiki/Subroutine subroutines].


Idea of a "core command" borrowed from https://web.archive.org/web/20211022230451/https://old.reddit.com/r/tf2scripthelp/wiki/corecommands
Most programming languages document the essential syntactic units of the language ([https://en.wikipedia.org/wiki/Statement_(computer_science) statements]), which are different from most built-in functions and all user-defined functions. Statements are uniquely meta-linguistic, they perform things like control flow, defining subroutines, jumping execution to certain lines, exiting the program, etc.
It'd be bold to compare the console commands to a language with syntax, but the console does in fact, possess a few commands that don't affect the game world.  


[[Category:Console Commands]]
These few commands affect nothing but the console itself, so they are meta-linguistic in a sense. It'd be nice to have a complete palette of them, as they are the basic building blocks that manipulate commands and convars that do affect the game world.
 
<hr>
* {{ent|alias}} - Create a console subroutine
* {{ent|bind}} - Run a console command when a key is pressed
* {{ent|BindToggle}}
* {{ent|cmd}} - Forward a command to the server
* {{ent|condump}}
* {{ent|con_filter_enable}}
* {{ent|con_filter_text}}
* {{ent|con_filter_text_out}}
* {{ent|con_notifytime}}
* {{ent|con_log|<file>}}
* {{ent|con_logfile|<file>}}
* {{ent|con_timestamp}}
* {{ent|con_trace}}
* {{ent|developer|<0-2>}}
* {{ent|echo}}
* {{ent|exec}} - Execute a sequence of console commands from a file
* {{ent|execifexists}}
* {{ent|execwithwhitelist}}
* {{ent|incrementvar}} - Increment a Cvar
* {{ent|multvar}} - Multiply a Cvar
* {{ent|rcon}} - Forward a command to the remote console of a server you administrate
* {{ent|script}} - Run [[Vscript]]
* {{ent|setinfo}} - Create a console variable (Cvar)
* {{ent|toggle}} - Interpolate a Cvar
* {{ent|wait}} - Pause execution for N frames/ticks
* {{ent|whitelistcmd}}
 
== Source 2==
{{stub}}
* {{ent|blink}} - "Blink specified convar value between two values at the specified duration."
* A pipe character (|) can now be used to compose commands <in a more complex way>.
* {{ent|execute_command_every_frame}}
* {{ent|echoln}} instead of echo
* {{ent|cyclevar}} instead of toggle
* {{ent|url_execute}} - (Possibly? Haven't tested to see what it does) - "Executes url-based commands, used for incoming commands from url-based launches when the game's already running."
== See also ==
[https://wiki.teamfortress.com/wiki/Scripting#Advanced_Scripting_Techniques Scripting in the TF2 wiki] - for scripting idioms.
 
[[Category:Lists of console commands and variables]]

Latest revision as of 04:03, 19 June 2024

Commands commonly used in Developer console scripting.

Most programming languages document the essential syntactic units of the language (statements), which are different from most built-in functions and all user-defined functions. Statements are uniquely meta-linguistic, they perform things like control flow, defining subroutines, jumping execution to certain lines, exiting the program, etc. It'd be bold to compare the console commands to a language with syntax, but the console does in fact, possess a few commands that don't affect the game world.

These few commands affect nothing but the console itself, so they are meta-linguistic in a sense. It'd be nice to have a complete palette of them, as they are the basic building blocks that manipulate commands and convars that do affect the game world.


Source 2

Stub

This article or section is a stub. You can help by expanding it.

  • blink - "Blink specified convar value between two values at the specified duration."
  • A pipe character (|) can now be used to compose commands <in a more complex way>.
  • execute_command_every_frame
  • echoln instead of echo
  • cyclevar instead of toggle
  • url_execute - (Possibly? Haven't tested to see what it does) - "Executes url-based commands, used for incoming commands from url-based launches when the game's already running."

See also

Scripting in the TF2 wiki - for scripting idioms.