logo Scripting for Enemy Territory

Menu


Home
Tutorials
Downloads
Forum
Contact

Friends





Advanced tutorial 5

Confirmation echoes.

When executing a script or your autoexec, it's nice to know if it has actually been executed. You can use the echo command for this purpose. So you want to echo some information, when your autoexec is executed. Something like:
>Autoexec loaded!

The only thing you need to do is add the echo line to your autoexec:





Now as you can see it's not binded to a key or set to a variable. It's just a command, which will be executed directly when your autoexec is executed. So if this line is echoed, you know your autoexec is loaded. It will look something like this in the echo section:



You can even go a bit further with this. Let's say you made a config with an autoexec in which 3 other cfg files are executed: settings.cfg, vsays.cfg and scripts.cfg. If you place a confirmation echo is all 3 cfg files, then all 3 will be automatically echoed, cause the autoexec executes all 3 cfg files. The setup could look like this:

Autoexec.cfg:
As you can see a confirmation echo and execution of the 3 cfg files:





And a confirmation echo in each cfg file:
settings.cfg



vsays.cfg



scripts.cfg





Resulting in the following echo, when executing he autoexec.cfg:



Back to the tutorial list