Manialink Injector Library

By

Posted: August 22 2020

Last updated: August 22 2020

Downloads 18
Download ML_Injector_Lib.as (2.99 KB)
Game Trackmania
Resource
Developer

This library will makes you able to display a Manialink page over game generated one.

It contain 3 functions (version 0.1):

  • CGameUILayer@ Inject_Map_Editor_Layer(wstring manialink, string id)
  • CGameUILayer@ Inject_Main_Menu_Layer(wstring manialink, string id)
  • CGameUILayer@ Inject_Ingame_Layer(wstring manialink, string id)

manialink argument is your ML pages and id is a string that'll avoid doubles, if a loaded layers has the same ID, it'll get destroyed. the function will return you the layer object that has just been created. it can be useful to retrieve maniascript handler and local page object. localpage is the class that will makes you able to retrieve ML element and modify them like element position, color etc. maniascript handler is where all MS related things will be, like time, pendingEvents etc... Be carful with pending events because "yield();" will empty pending events so be careful with it.

P.S. : you can take a look at https://openplanet.nl/files/55 for a good example of ML page modified by AS code

DM MosKi#4531 on discord for any update request