MAJ + SCROLL LOCK
.CTRL + G
. Log fonction in maniascript : log("My log text");
.#Setting S_ScriptEnvironment "development"
, please use production mode when you’re not in dev : #Setting S_ScriptEnvironment "production"
Scripts/Modes/TrackMania
First you need to choose the base of your gamemode. You can extend a Nadeo gamemode or a general base.
Nadeo gamemodes bases :
#Extends "Modes/TrackMania/TM_Champion_Online.Script.txt"
#Extends "Modes/TrackMania/TM_Cup_Online.Script.txt"
#Extends "Modes/TrackMania/TM_Knockout_Online.Script.txt"
#Extends "Modes/TrackMania/TM_Laps_Online.Script.txt"
#Extends "Modes/TrackMania/TM_Rounds_Online.Script.txt"
#Extends "Modes/TrackMania/TM_Teams_Online.Script.txt"
#Extends "Modes/TrackMania/TM_TimeAttack_Online.Script.txt"
General base :
#Extends "Libs/Nadeo/TMxSM/Race/ModeTrackmania.Script.txt"
Be carefull with the general base, you can’t play with that comapre to Nadeo gamemode base, you will have more work to do.
The #Extend is the only minimal requirements. You can launch the gamemode with only that line.
You need to add and fill these Constants before launching the gamemode foir the first time :
#Const CompatibleMapTypes "TrackMania\\TM_Race,TM_Race"
#Const Version "2021-01-02"
#Const Author "AuhorName"
#Const ScriptName "My New Gamemode"
#Const Description "Gamemode Description"
#Extends
#Const
#Setting
#Include
#Command
#Struct
// List of your global variables
***Match_StartServer***
***
// Code to execute when the server is started
***
***Match_InitMap***
***
// Code to execute when a map is initialized
***
***Match_StartMap***
***
// Code to execute when a map is starting
***
***Match_Playloop***
***
// Main loop where the code is executed through the duration of the map
***
***Match_EndMap***
***
// Code to execute at the end of a map
***
// List of the functions of the gamemode
Everything like ***Match_InitMap*** are phases in gamemodes, here are the major ones and the order :
The PlayLoop is the only loop where the major script of the gamemode is executed, all other are for most of the times launch only once. The PlayLoop will be executed until a MB_StopMatch();
is called.