/** * Gamemode with Malus send periodically. * This mode is in multiple files to be able to have malus during the WarmUp * You can change the Gamemode below by anything else */ // #RequireContext CSmMode #Extends "Modes/TrackMania/TM_Rounds_Online.Script.txt" #Include "Libs/Nadeo/Trackmania/MainMenu/Constants.Script.txt" as MenuConsts #Include "Modes/TM2020-Gamemodes/Libs/Malus.Script.txt" as Malus #Setting S_MalusDuration 10 as "Duration of the Malus" #Setting S_MalusMinCooldown 5 as "Minimal delay before the next Malus" #Setting S_MalusMaxCooldown 30 as "Maximal delay before the next Malus" ***Match_StartServer*** *** // Disable registering PB Race::SetupRecord( MenuConsts::C_ScopeType_Season, MenuConsts::C_ScopeType_PersonalBest, MenuConsts::C_GameMode_TimeAttack, "", False, //C_UploadRecord False, //C_DisplayRecordGhost False, //C_DisplayRecordMedal False, //C_CelebrateRecordGhost False //C_CelebrateRecordMedal ); *** ***Match_AfterLoadHud*** *** AddMalusUI(); *** ***Match_InitMap*** *** Malus::Reset(); *** ***Match_StartRound*** *** Malus::StartRound(S_MalusDuration ,S_MalusMinCooldown, S_MalusMaxCooldown); *** ***Match_StartWarmUpRound*** *** Malus::Reset(); Malus::StartRound(S_MalusDuration ,S_MalusMinCooldown, S_MalusMaxCooldown); *** ***Match_WarmUpLoop*** *** Malus::Yield(); *** ***Match_PlayLoop*** *** Malus::Yield(); *** ***Match_EndRound*** *** Malus::Reset(); *** Void AddMalusUI() { declare Text AttachId = "Malus_MalusMessages"; declare Text Manialink = """ """; Layers::Create(AttachId, Manialink); Layers::SetType(AttachId, CUILayer::EUILayerType::Normal); Layers::Attach(AttachId); }