Adds a condition for failing to a mission stage.
Scope
This command should be called between calls to AddStage and CloseStage in a mission's initialisation script.
Syntax
MFK
Lua
AddCondition( condition_type, [keepbarrel_fail_stage_count] );Game.AddCondition( condition_type, [keepbarrel_fail_stage_count] )- type: The type of condition to add.
- keepbarrel_fail_stage_count: The number of stages to go back when failing a keepbarrel condition.
Examples
MFK
Lua
SelectMission("m1");
AddStage();
SetStageTime(10);
AddObjective("dummy");
CloseObjective();
// Fail the player if they take longer than 10 seconds on this stage
AddCondition("timeout");
CloseCondition();
CloseStage();
CloseMission();Game.AddStage()
Game.SetStageTime(10)
Game.AddObjective("dummy")
Game.CloseObjective()
-- Fail the player if they take longer than 10 seconds on this stage
Game.AddCondition("timeout")
Game.CloseCondition()
Game.CloseStage()Notes
No additional notes.