MFK Command: AddStage

Synopsis

This command begins a stage in a mission.

This is intended to be used inside a Mission.

Syntax

"final"

AddStage("final");

The string "final" can be specified to mark the stage as the final stage of the mission.

This will tell the game to show "Mission Complete!" on the screen when the mission ends and will also mark the mission as complete in your save data. As such, this is not used in Sunday Drive missions.

"locked"

AddStage("locked", "car", <car>);
AddStage("locked", "skin", <skin>);

Using locked followed by car or skin and the name of a car/skin will make the stage show a message (whose index is specified with SetStageMessageIndex) when it's reached if the player is not currently using that car/skin.

These types of stages are typically coupled with a buycar or buyskin objective in the next stage but this is not a requirement.

You must have at least one subsequent stage of any type following a locked stage for it's message to appear.

Other Parameters

In many of Radical's mission scripts, a number is passed as an argument to this command. This number is meaningless.

Examples

Here is an example of a final stage.

SelectMission("m1");
	...

    // End the mission with a 1 second timer stage.
    AddStage("final");
        AddObjective("timer");
            SetDurationTime(1);
        CloseObjective();
    CloseStage();
CloseMission();

Here is an example of a locked car stage.

SelectMission("m1");
	...
    
    AddStage("locked","car","homer_v");
        SetStageMessageIndex(0); // Show INGAME_MESSAGE_00 in a popup message box.

        AddObjective("dialogue");
            ...
        CloseObjective();
    CloseStage();

    AddStage();
        AddObjective("buycar", "homer_v");
            // Require the player to get the 70s Sports Car to accompany the message.
        CloseObjective();
    CloseStage();
CloseMission();

Locked stages can also be exploited to always show messages to the player.

SelectMission("m1");
	...

    // Impossible "locked" condition that means this stage will always show a message box.
    // Your current skin can never be a blank string.
	AddStage("locked","skin",""); 
        SetStageMessageIndex(1);
        
		// Radical always uses dialogue objectives for locked stages but that is not a requirement.
        AddObjective("timer");
            SetDurationTime(1);
        CloseObjective();
    CloseStage();

	// Locked stage messages DO NOT work unless there's at least one stage following the locked stage.
	// So if you don't have anything after yours, you can just add a simple timer stage.
	AddStage();
		AddObjective("timer");
			SetDurationTime(0);
		CloseObjective();
	CloseStage();
CloseMission();

Notes

There is a maximum of 25 stages per mission.

Back to top