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
  • Games
  • Radical Entertainment
  • The Simpsons: Hit & Run
  • Scripting
  • Mission Objectives

buyskin

This type of objective requires the player to purchase or wear a specific skin to pass the stage.

Examples

MFK
Lua

This example demonstrates the way Radical uses these stages, preceded by a locked stage with the required skin specified.

AddStage("locked", "skin", "l_cool");
	// Locked stages use INGAME_MESSAGE strings instead of MISSION_OBJECTIVE strings.
	// This would show INGAME_MESSAGE_03 after the objective is passed.
	SetStageMessageIndex(3);
	AddObjective("dialogue");
		// ...
	CloseObjective();
CloseStage();

AddStage();
	// The second argument to AddObjective() specifies the skin the player must have to pass the stage.
	// If the player starts the stage with this as their active skin, it will automatically pass.
	// Otherwise, they will have to purchase it or wear it at a skin shop.
	AddObjective("buyskin", "l_cool");
	CloseObjective();
CloseStage();

This example demonstrates a buyskin objective being used without a locked stage before it. Despite Radical never using them in this manner, the objective still works as intended.

AddStage();
	// The second argument to AddObjective() specifies the skin the player must have to pass the stage.
	// If the player starts the stage with this as their active skin, it will automatically pass.
	// Otherwise, they will have to purchase it or wear it at a skin shop.
	AddObjective("buyskin", "l_cool");
	CloseObjective();
CloseStage();

This example demonstrates the way Radical uses these stages, preceded by a locked stage with the required skin specified.

Game.AddStage("locked", "skin", "l_cool")
	-- Locked stages use INGAME_MESSAGE strings instead of MISSION_OBJECTIVE strings.
	-- This would show INGAME_MESSAGE_03 after the objective is passed.
	Game.SetStageMessageIndex(3)
	Game.AddObjective("dialogue")
		-- ...
	Game.CloseObjective()
Game.CloseStage()

Game.AddStage()
	-- The second argument to AddObjective() specifies the skin the player must have to pass the stage.
	-- If the player starts the stage with this as their active skin, it will automatically pass.
	-- Otherwise, they will have to purchase it or wear it at a skin shop.
	Game.AddObjective("buyskin", "l_cool")
	Game.CloseObjective()
Game.CloseStage()

This example demonstrates a buyskin objective being used without a locked stage before it. Despite Radical never using them in this manner, the objective still works as intended.

Game.AddStage()
	-- The second argument to AddObjective() specifies the skin the player must have to pass the stage.
	-- If the player starts the stage with this as their active skin, it will automatically pass.
	-- Otherwise, they will have to purchase it or wear it at a skin shop.
	Game.AddObjective("buyskin", "l_cool")
	Game.CloseObjective()
Game.CloseStage()