ConsoleCommand

From ZDoom Wiki

Jump to: navigation, search
Warning: This feature is Skulltag specific, and is not compatible with ZDoom!
To see all of Skulltag's specific features, see Skulltag features.


int ConsoleCommand (str console command)

Usage

ConsoleCommand causes the player who activated the script to execute a console command as if he/she dropped the console and typed in the specified command. This can be used to change user settings and execute commands only available from the console.

Example

This example changes the player's FOV to 30 temporarily to zoom in on something.

script 6 (void)
{
print(s:"Hey look at that thing in the distance!");
Delay(20);
ConsoleCommand("fov 30");
Delay(300);
ConsoleCommand("fov 90");
print(s:"Isn't that amazing?!");
}

Declined Implementation

ConsoleCommand has often (6 times at least) been requested to be implemented into ZDoom. However it has been declined by the developers due to security risks. Because ConsoleCommand gives map authors access to the player's settings, it could easily be abused. An example would be a script that executes on the closing of the map which uses "unbind all", thus removing all of the player's current binds when he exits the game and later gets confused next time he boots up ZDoom.

For this reason, do NOT request this feature again!

Personal tools