MZ Scene_Map instance

I was wondering if the Scene_Map was ever instantiated. I looked around, but i couldn't find it.

And what does this do exactly?
Scene_Map.prototype = Object.create(Scene_Message.prototype);
Scene_Map.prototype.constructor = Scene_Map;

I feel like, this might have something to do with it. To me it looks like some sort of inheritance, but i also couldn't find an instance of Scene_Message or Scene_Base.
It would help if you gave some context as to what you were trying to do or figure out.

The current scene is stored in SceneManager._scene, which is of whatever type the current scene is.

And yes, that's inheritance.
Calling the goto, push, or pop methods of SceneManager queues a scene change. Each scene change, the SceneManager creates a new instance of the next scene.

Scene_Message and Scene_Base are never instanced directly: they're designed for inheritance. All scenes inherit from Scene_Base; the map and battle scenes inherit from Scene_Message.
Thank you for the quick answers.

I want to disable the menu button for a certain time, but i need an instance of the Scene_Map.
But i think i got it now.
OK, just a few comments:
I want to disable the menu button for a certain time, but i need an instance of the Scene_Map.
I don't see why you would need that:
  • To enable/disable menu access mid-playthrough, you can use the Change Menu Access event command. The Touch UI buttons will hide/show accordingly.

  • To change how the map scene determines when to show its Touch UI menu button, you can write a small plugin to patch or override the isMenuEnabled method of Scene_Map.

Original thread: https://forums.rpgmakerweb.com/threads/scene_map-instance.168957/