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

SetStageVehicleCharacterJumpOut

Available since Version 1.19.

Set the character to jump out of the vehicle when it's destroyed.

Scope

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

Additionally, this should only be called on characters previously added to the car with AddStageVehicleCharacter.

Syntax

MFK
Lua
SetStageVehicleCharacterJumpOut( car, character, [direction] );
Game.SetStageVehicleCharacterJumpOut( car, character, [direction] )
  • car: The name of the car.
    • current: The player's current car.
  • character: The name of the character.
  • direction: The direction that the character will jump out of the vehicle. This is an angle from 0 to 360 degrees.
    • The default value of this depends on the character's position relative to the origin of the car.

Examples

MFK
Lua
AddStage();    
	AddStageVehicle("cVan", "m1_cVan", "NULL");

	AddStageVehicleCharacter("cVan", "lisa");
	SetStageVehicleCharacterJumpOut("cVan", "lisa", 270);

	AddObjective("dummy");
	CloseObjective();
CloseStage();
Game.AddStage() 
	Game.AddStageVehicle("cVan", "m1_cVan", "NULL")

	Game.AddStageVehicleCharacter("cVan", "lisa")
	Game.SetStageVehicleCharacterJumpOut("cVan", "lisa", 270)

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