Adding windows that sit above all others

Status
Not open for further replies.

DarknessFalls

Rpg Maker Jesus - JS Dev.
Veteran
Joined
Jun 7, 2013
Messages
1,393
Reaction score
210
First Language
English
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 ??
 

Mellye

Veteran
Veteran
Joined
Oct 24, 2015
Messages
347
Reaction score
279
First Language
Portuguese
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.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,108
Reaction score
13,713
First Language
English
Primarily Uses
RMMV
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.
 

DarknessFalls

Rpg Maker Jesus - JS Dev.
Veteran
Joined
Jun 7, 2013
Messages
1,393
Reaction score
210
First Language
English
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 :D
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,108
Reaction score
13,713
First Language
English
Primarily Uses
RMMV
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?
 
Last edited by a moderator:

DarknessFalls

Rpg Maker Jesus - JS Dev.
Veteran
Joined
Jun 7, 2013
Messages
1,393
Reaction score
210
First Language
English
You didn't suggest using the $gameMessage :p
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,108
Reaction score
13,713
First Language
English
Primarily Uses
RMMV
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 :p
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.
time for a new avatar :)

Forum statistics

Threads
106,018
Messages
1,018,357
Members
137,803
Latest member
andrewcole
Top