[XP] Is it possible to use "Script" command to change Textbox Z-axis?

PlzBeQuiet

Villager
Member
Joined
Sep 17, 2013
Messages
5
Reaction score
0
Primarily Uses
First, I use Ccoa's UMS script.

So, I wanted the Pictures in my project (From "Show Picture" event) to appear IN FRONT of the Textboxes, like so:


So I modified the UMS script a little. There's a part in it that looks like this:
Code:
class Window_Message < Window_Selectable
  def initialize
      .
      .
      self.z = 9998
      .
      .
  end
end
I simply changed the value of self.z to 100, making the Textbox's Z-axis smaller than that of a Picture. It worked, but now I face a different problem...

What do I do if sometimes I want the Pictures to display behind a Textbox? In other words, how do I change self.z back to 9998 temporarily while in the game? Is it even possible? I tried a bunch of things using the "Script" event command, similar to:
Code:
Window_Message.initialize.z = 9998
But nothing worked. No surprise here, since I know pretty much nothing in RGSS lol. I don't even know if my syntax is correct :stickytongue:

I'll appreciate any help...
 
Last edited:

DrDhoom

Monkey Needs a Hug
Veteran
Joined
Mar 16, 2012
Messages
154
Reaction score
157
First Language
Indonesian
Primarily Uses
N/A
You can set the z value to a variable with reset_window method, the value will be refreshed each time the window is popped up.
Don't forget to change the VARIABLEID.
Code:
class Window_Message < Window_Selectable
  def reset_window
    self.z = $game_variables[VARIABLEID]
    .
  end
end
 

PlzBeQuiet

Villager
Member
Joined
Sep 17, 2013
Messages
5
Reaction score
0
Primarily Uses
You can set the z value to a variable with reset_window method, the value will be refreshed each time the window is popped up.
Don't forget to change the VARIABLEID.
Code:
class Window_Message < Window_Selectable
  def reset_window
    self.z = $game_variables[VARIABLEID]
    .
  end
end
Niiiiice, that worked! Thanks a bunch!

EDIT:
Actually, I celebrated too early... I really need to check things thoroughly before saying "it worked" lol. Sorry about that.
@DrDhoom Could you tell me exactly step-by-step what I need to do? I put your code in the Script Editor, defined a variable as a value for the Z, and things just don't seem to work. For starters, the choice window ("Show Choices" event) is invisible, no matter the value. Also, sometimes the textbox is completely invisible no matter the value (Almost seems random). If it matters, I set values into variable 56, so in the script I wrote $game_variables[56].
Maybe it should be $game_variables[0056]? lol
I will repeat and emphasize that I know nothing about RGSS/Ruby, I'm only decent-ish at Javascript :3
So, again, what exactly do I need to do with your code? Put it in the "Script" event, or the Script Editor? Should I make a new separate script for it, or insert it into the UMS script? Etc.
Appreciate it~
 
Last edited:

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

Latest Threads

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

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.

Forum statistics

Threads
106,035
Messages
1,018,454
Members
137,821
Latest member
Capterson
Top