Advanced tutorial 2
Class map and team autoexec files.
In the basic scripting section we discussed the autoexec.cfg file. Most mods now also support autoexec files for map, team and class. We will discuss all 3 types.
Before we start 1 important note:
All these autoexec files do not go in the etmain folder, but in the folder of the mod you play! E.g. the etpro folder.
1. Map
For all these autoexec files the spelling of the file name is essential. For the map autoexec files the file name has to be:
autoexec_mapname.cfg
So if you want to make one for oasis, then it has to be:
autoexec_oasis.cfg
Now what is it useful for. Well these autoexec files give you the possibility to have special settings for just this map. For instance some maps are darker then others. You might want to set your brightness (the so called gamma) higher for these maps. Let's say your default gamma is 3 and for radar you would like it to be 1. How do you set that up. It's done as follwed. Make an autoexec_radar.cfg and an autoexec_default.cfg. The default one is loaded when no autoexec is found for the map you are playing! Then you place the commands in those file:
autoexec_radar.cfg
set r_gamma 1
autoexec_default.cfg
set r_gamma 3
It's as easy as that!
Note:
The autoexec for maps is often used to make spawnselectors. You can put the relevant spawns in the autoexec for a specific map. CHeck the download section for a spawn selector.
2. Team
Not so hard to guess that these are autoexec_axis.cfg and autoexec_allies.cfg. This way you can set up different settings settings per team. Maybe you want to have different say and vsay binds per team. For instance:
autoexec_axis.cfg
bind x "vsay cheer ^1>^7Goooooo Axis^1!"
autoexec_allies.cfg
bind x "vsay cheer ^4>^7Goooooo Allies^4!"
3. Class
The following are class related autoexec files:
* autoexec_medic
* autoexec_engineer
* autoexec_fieldops
* autoexec_covertops
* autoexec_soldier
Using these enable you to have different scripts/binds per class. This way you could give a key a different functionality for each class.
|