Page 1 of 1
CMapEditorPlugin::IsTesting
Posted: 01 Dec 2019, 17:21
by maxi031
Not sure if this is bug or i am not using it right.
When making editor plugin if i I use IsTesting and IsValidating in while loop they are always False, even if am validating or testing the map.
Re: CMapEditorPlugin::IsTesting
Posted: 01 Dec 2019, 22:52
by mGuy
Re: CMapEditorPlugin::IsTesting
Posted: 02 Dec 2019, 03:56
by Harest
When you're racing (aka the case when validating or testing a map), none EditorPlugin is running afaik, at least the ones you enable from the Plugins "tab" in the MapEditor.
I know i wanted to add some stuff in an EditorPlugin before realising it'd not work the way i thought so i did a Manialink i call in a MT clip (same way as the quests) for what i wanted (displaying current position).
The thing is, IsTesting/IsValidating are const from CMapEditorPlugin, so i'm curious to know how you can actually use that.
Re: CMapEditorPlugin::IsTesting
Posted: 02 Dec 2019, 10:44
by Miss
A variable being const doesn't mean you can't use it, it just means you can't change it.
Re: CMapEditorPlugin::IsTesting
Posted: 02 Dec 2019, 11:59
by reggie1000
IsValidating is working when you validate a map with Validate(); or with the validation flag button.
IsTesting is indeed not working because scripts are not being executed during a Test or Test map with mode. If the IsTesting is here though, it may be because of Turbo, where things may have been working differently to get the UI (showing speed etc) even while testing a map, without any mode.
But as the plugins are not being executed, you don't need any kind of "while(IsTesting) yield;" anyways currently.
I hope that I didn't forget any particular situation where it can still be used though, but if I find it I'll keep you updated.
Re: CMapEditorPlugin::IsTesting
Posted: 02 Dec 2019, 14:56
by Harest
Miss wrote: ↑02 Dec 2019, 10:44
A variable being const doesn't mean you can't use it, it just means you can't change it.
I know that ^^. Sorry if my precision in the last sentence confused you :p.
And thanks for the additional info @Reggie1000.