Donut Team is a labor of love, built and maintained by a small group of passionate developers. We invest our own time and resources to offer our tools, mods, and web services completely free of charge.

We don't run ads, and we will never sell your data - period.

If you've enjoyed anything we've created, please consider supporting our work with a one-time or monthly donation via our Ko-fi page . Every contribution helps us continue building great experiences for the community.

Dismiss
  • Modding Tools
  • Lucas' Simpsons Hit & Run Mod Launcher
  • Hacks
  • Mod Requirable Hacks
  • Additional Script Functionality
  • Console Commands
  • General Commands

IfAllMissionsCompleted

Available since Version 1.27.

Checks if all of the given missions are completed.

Scope

This command can be called anywhere.

Syntax

MFK
Lua
IfAllMissionsCompleted( ...missions )
Game.IfAllMissionsCompleted( ...missions )
  • ...missions: Specify up to 15 missions to check as separate arguments.
    • l1m0, l1m1, l1m2, l1m3, l1m4, l1m5, l1m6, l1m7, l1bm1, l1gr1, l1sr1, l1sr2, l1sr3
    • l2m1, l2m2, l2m3, l2m4, l2m5, l2m6, l2m7, l2bm1, l2gr1, l2sr1, l2sr2, l2sr3
    • l3m1, l3m2, l3m3, l3m4, l3m5, l3m6, l3m7, l3bm1, l3gr1, l3sr1, l3sr2, l3sr3
    • l4m1, l4m2, l4m3, l4m4, l4m5, l4m6, l4m7, l4bm1, l4gr1, l4sr1, l4sr2, l4sr3
    • l5m1, l5m2, l5m3, l5m4, l5m5, l5m6, l5m7, l5bm1, l5gr1, l5sr1, l5sr2, l5sr3
    • l6m1, l6m2, l6m3, l6m4, l6m5, l6m6, l6m7, l6bm1, l6gr1, l6sr1, l6sr2, l6sr3
    • l7m1, l7m2, l7m3, l2m4, l2m5, l2m6, l2m7, l2bm1, l2gr1, l2sr1, l2sr2, l2sr3
    • These identifiers are case-insensitive.

Examples

MFK
Lua
IfAllMissionsCompleted("L7SR1", "L7SR2", "L7SR3")
{
	// Add extra stage when all of Level 7's street races have been completed
	AddStage();
		// ...
	CloseStage();
}
!IfAllMissionsCompleted("L1M1", "L1M2", "L1M3")
{
	// Only add this stage if the player hasn't completed L1M1 to L1M3
	AddStage();
		// ...
	CloseStage();
}
Game.IfAllMissionsCompleted("L7SR1", "L7SR2", "L7SR3")

	-- Add extra stage when all of Level 7's street races have been completed
	Game.AddStage()
		-- ...
	Game.CloseStage()
Game.EndIf()
Game.Not_IfAllMissionsCompleted("L1M1", "L1M2", "L1M3")

	-- Only add this stage if the player hasn't completed L1M1 to L1M3
	Game.AddStage()
		-- ...
	Game.CloseStage()
Game.EndIf()

Notes

Due to the nature of how console scripts work in the game, all conditional commands are evaluated at the time the script is executed. This unfortunately limits the utility of many of these types of commands, but we believe they still have some use cases even with this limitation.