Adding windows that sit above all others

I suppose there is an easy way to do this, but I cant see it, maybe some one else will. consider the following:

Player hits menu, player uses item, player dies, reason is said. it should be a window that sits above all other in this case, to tell the player why they have died.

How ever consider the next situation. Player uses shrine, player is healed, player dies. I would like to re-use the same window to pop up and be like "yo you just did something and now you die ... "

Is there an easy way to say "create a window that sits above everything and requires user input"?

a game message works for battles, but not for this particular situation, at least not for non menu related situations ... 

I would like to trigger the window from the Game_Action.apply method, so would I push the new window onto Scene_Base ??
This might be useful: http://forums.rpgmakerweb.com/index.php?/topic/46334-coping-with-the-loss-of-z-indexes-in-mv/

I would like to trigger the window from the Game_Action.apply method, so would I push the new window onto Scene_Base ??
You can edit your relevant  Scene_xyz initialization methods (or their parents) to setup those windows and leave them closed/hidden until necessary, and create a method to show them when it's time.

Then on Game_Action.apply you can call for the SceneManager._scene.ShowMyCustomWindow(message). You might make some checks to make sure that the current Scene is among the ones you'd expect to be, just in case.
Is this window only ever going to appear on the map?


If so, I would take a look at the windows & classes associated with Game_Message and follow their pattern. See what other windows are linked with Game_Map, and place your new one right at the bottom. Then use logic similar to the message system to populate the text and open the window.


In fact, is there any reason you can't use the message window? That can be triggered via script, and is available on the map and within battle. Game_Interpreter would have a function showing how to trigger it, or you could simply use a common event with a switch for the trigger and a variable containing the reason.
for this particular case and rethinking my design choices said window would never appear on the map, if it did I would not use what shaz has suggested I would use $gameMessage.add(textHere) as it will force a new message window to open after the message has been called.

As for the z-index stuff for the menu I will look into it 😀
Actually, I did suggest using the message window 😉

I would take a look at the windows & classes associated with Game_Message and follow their pattern.


In fact, is there any reason you can't use the message window?
You didn't suggest using the $gameMessage 😛
I would take a look at the windows & classes associated with Game_Message and follow their pattern.
Actually, I did.


Knowing that you're a better scripter than anyone else on this forum, and how devout you are about researching things instead of just asking, I kind of assumed you would be capable of looking at the windows & classes associated with Game_Message which would lead you right to $gameMessage.


I apologize for overestimating your abilities. I'll be sure not to do that again 😛

Original thread: https://forums.rpgmakerweb.com/threads/adding-windows-that-sit-above-all-others.50641/