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
  • Console Commands
  • MFK Commands
  • Level Initialisation
  • Chase Manager

CreateChaseManager

Creates a chase manager for a level.

Scope

This command should be called in a level's initialisation script.

Syntax

MFK
Lua
CreateChaseManager( car_name, con_file, spawn_rate );
Game.CreateChaseManager( car_name, con_file, spawn_rate )
  • number_of_cars: The number of chase cars to spawn.
    • Can be set anywhere from 0 to 5.
  • con_file: The CON file to use for the chase cars.
    • Relative to scripts/cars.
  • spawn_rate: The spawn rate of this chase managers cars.
    • This technically sets a value and has an effect on spawning logic in the game, but as a consequence of there being a max of 1 chase manager, effectively does nothing meaningful.

Examples

MFK
Lua
// Example from Radical's scripts/missions/level01/leveli.mfk
CreateChaseManager("cPolice", "Pursuit\L1cop.con", 1);
-- Example from Radical's scripts/missions/level01/leveli.mfk
Game.CreateChaseManager("cPolice", "Pursuit\\L1cop.con", 1);

Notes

There is a max of 1 chase manager per level.