Games > The Simpsons Hit & Run > Console File Commands > CON Commands > SetDriver

SetDriver

This command sets the driver of a vehicle.

Syntax

SetDriver( character );

Game.SetDriver( character )

  • character: The name of the character who will drive the vehicle.
    • This character will only appear if they're not suppressed with SuppressDriver in the level's load script.

Examples

// This vehicle will have Homer as its driver (unless he's suppressed for the level)
SetDriver("homer");
// "none" is special and means the vehicle will have no driver.
SetDriver("none");

-- This vehicle will have Homer as its driver (unless he's suppressed for the level)
Game.SetDriver("homer")
-- "none" is special and means the vehicle will have no driver.
Game.SetDriver("none")

Notes

Using "none" is NOT equivalent to not calling the command outright. Omitting the command entirely is special in two cases:

  • Traffic Vehicles: Traffic car CON files do not call this command at all. This indicates to the game that it should add an invisible driver that uses random traffic dialogue.
  • Mission Vehicles: Mission vehicles added with AddStageVehicle can define a path to their CON file. These CON files typically omit SetDriver as AddStageVehicle can specify a driver inline which does not work if the CON file does so.
Donut Team © 2024 · v4.0