M_Game - mazexz7/simpsons-hit-run GitHub Wiki
Functions for M_Game module
Notice: Functions must have the prefix 'M_Game.'
All of these commands are supported by Donut Team's
game.lua
module, make sure you have that in your mod.
Mission console commands
Talk(Icon, Text)
Creates a text dialogue |Returns mission stage context
Icon
: Image path;Text
: Mission objective index;
TalkNPC(Icon, Text, Npc, Locator)
Creates a text dialogue and spawns an NPC |Returns mission stage context
Icon
: Image path;Text
: Mission objective index;Npc
: Character model;Locator
: Locator 2 Type 3 (0x3000005);
TalkDrive(Icon, Text)
Creates a text dialogue, without stopping your car/character |Returns mission stage context
Icon
: Image path;Text
: Mission objective index;
Wait(Time)
'Pauses' the mission |Returns mission objective
Time
: Time in milliseconds;
WaitNPC(Time, Npc, Locator)
'Pauses' the mission and spawns an NPC |Returns mission objective
Time
: Time in milliseconds;Npc
: Character model;Locator
: Locator 2 Type 3 (0x3000005);
Dummy()
Returns a dummy objective
SetBMP(Sprite)
Loads a presentation sprite (must be inside art/frotnend/dynaload/images) |Returns stage command
- Sprite: Sprite name;
AddMorty(Vehicle)
NOTICE: THIS COMMAND ONLY WORKS IF THE CHARACTER MODEL 'morty' EXISTS IN YOUR GAME | Adds morty to a car |Returns stage command
- Vehicle: Car drawable name;
Load Commands
LoadCar(Car, Type)
Loads disposable car |Returns load command
Car
: Vehicle drawable name;Type
: AI/OTHER/DEFAULT;
LoadAICar(Car)
Loads disposable car of type 'AI' |Returns load command
Car
: Vehicle drawable name;
LoadMainCar(Car)
Loads disposable car of type 'DEFAULT' |Returns load command
Car
: Vehicle drawable name;
LoadIcon(Name, Type)
Loads an icon from inside msnicons file |Returns load command or nil if no Type
is specified
Name
: Image sprite name;Type
: Enum ([c = char], [l = location], [o = object], [v = vehicle]);
LoadProp(Number, Name)
Loads prop for the mission |Returns load command
Number
: A number from 1 to 7, represents level number;Name
: Prop file name;