Commands - AnduoGames/ThirdCrisisModding GitHub Wiki

Commands in Third Crisis are used in the developers console. Modders can create new commands and run them in the same way they are used in the game.

Creating a new command goes as follows:

ConCommand.Add("print.strings", delegate (List<string> args)
{
    // Everything in here will execute when the command typed in the console

    // Arguments can be added to the command as well
    foreach (string arg in args)
    {
         Debug.Log(arg);
    }
});

A command does not require arguments to run, for example this command has no arguments:

ConCommand.Add("game.quit", delegate
{
    Application.Quit();
});

You only need to add a command once, this should be done when the mod is loaded. Any more times will overwrite the last.

⚠️ **GitHub.com Fallback** ⚠️