Page 1 of 1
declaring for 'This'
Posted: 01 Apr 2016, 16:26
by djhubertus
I saw on some scripts that it's possible to declare variables for This but I can't find any informations about that. Is it declaration to server?
Re: declaring for 'This'
Posted: 03 Apr 2016, 11:07
by zocka
'This' represents the current context (CMlBrowser in Manialinks, CEditorPlugin in editor plugins, C(T|S)mMode in gamemodes etc) being the "entry point" to access e.g. CMlScript::Page as implicit This.Page.
As I understand it, it is the most general qualified object you could 'declare for'.
(However I don't have experience with using persistent declarations for This. I would assume that declaring persistent variables for the CMlBrowser itself could be available to every Manialink as they share the Browser whereas the Page variable is associated with a certain page.)
Re: declaring for 'This'
Posted: 03 Apr 2016, 13:53
by Dommy
Declaring stuff for LocalUser is helpful in keeping data between manialinks and other places, like plugins. However this doesn't work well if there is no title pack loaded.