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
  • MFK Commands
  • Mission Initialisation
  • Stages
  • Stage Vehicles

AddStageVehicleCharacter

Available since Version 1.19.

Add a character to a stage vehicle or the player's car for a stage.

Scope

This command should be called between calls to AddStage and CloseStage in a mission's initialisation script.

Syntax

MFK
Lua
AddStageVehicleCharacter( car, character, [joint, rotation] );
Game.AddStageVehicleCharacter( car, character, [joint, rotation] )
  • car: The name of the car to add the character to.
  • current: The player's current car.
  • character: The name of the character to add.
  • joint: The name of the joint to place the character on.
    • Defaults to pl.
    • If the joint does not exist, the character will not be added to the car and any subsequent commands related to them will be ignored.
  • rotation: The rotation of the character on the joint.
    • Defaults to 180.
    • 180 is facing forwards in the car since characters are backwards in this game.

Examples

MFK
Lua
AddStage();
	// Add Marge to the Passenger Seat of the Player's Car
	AddStageVehicleCharacter("current", "marge");

	// Add Lisa and Bart to "cVan"
	//	(you'd probably want to add custom joints to the car for multiple passengers)	
	AddStageVehicle("cVan", "m1_cVan", "NULL");
	AddStageVehicleCharacter("cVan", "lisa");
	AddStageVehicleCharacter("cVan", "bart", "sl", 0);	// Bart uses the smoke location in this example.

	AddObjective("dummy");

	CloseObjective();
CloseStage();
Game.AddStage()
	-- Add Marge to the Passenger Seat of the Player's Car
	Game.AddStageVehicleCharacter("current", "marge")

	-- Add Lisa and Bart to "cVan"
	--	(you'd probably want to add custom joints to the car for multiple passengers)	
	Game.AddStageVehicle("cVan", "m1_cVan", "NULL")
	Game.AddStageVehicleCharacter("cVan", "lisa")
	Game.AddStageVehicleCharacter("cVan", "bart", "sl", 0) -- Bart uses the smoke location in this example.

	Game.AddObjective("dummy")
	
	Game.CloseObjective()
Game.CloseStage()