This article's documentation is for the "GoldSrc" engine. Click here for more information.
This article's documentation is for anything that uses the Source engine. Click here for more information.
This article's documentation is for Source 2. Click here for more information.

Echo: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (extra detail)
No edit summary
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Stub}}{{Console command}}
{{this is a|console command|name=echo|engine=GoldSrc|engine1=Source|engine2=Source 2
The '''echo''' command is a command avaliable in {{goldsrc|4}} and {{source|4}}. It's main purpose is to output text into the console window. This command proves to be very useful for debugging purposes.
}}
It is used to print text into the console window. When used in tandem with scripts, the {{code|echo}} command can prove to be very useful in cases where you will need to debug problems.
{{bug|If {{code|con_filter_enable}} is set to 1 and {{code|con_filter_text}} is not blank, a newline will not be printed.}}
==Syntax==  
==Syntax==  
   echo <text>
   echo <text>
Line 11: Line 13:


<code>key : 79</code> will be seen in the console twice; once on press, once on release.
<code>key : 79</code> will be seen in the console twice; once on press, once on release.
{{stub}}

Latest revision as of 12:54, 18 June 2025

echo is a console command available in all GoldSrc GoldSrc, Source Source, and Source 2 Source 2 games. It is used to print text into the console window. When used in tandem with scripts, the echo command can prove to be very useful in cases where you will need to debug problems.

Icon-Bug.pngBug:If con_filter_enable is set to 1 and con_filter_text is not blank, a newline will not be printed.  [todo tested in ?]

Syntax

 echo <text>

Examples

 echo Hello world

Special use

When appended to a key bound to a + statement (but only directly), the key code will be appended

 bind shift “+duck; echo key :”

key : 79 will be seen in the console twice; once on press, once on release.

Stub

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