check if a window is opening?

BlueMage

Slime Lv99
Veteran
Joined
Apr 13, 2019
Messages
116
Reaction score
147
First Language
English
Primarily Uses
RMVX
Hi guys,
I want to ask for a way to check if a window is opening (on Map scene)
for example to check whether Key Item window is opening or not?
Thanks = D
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,458
Reaction score
12,015
First Language
English
Primarily Uses
RMMV
If a window is opening or if it is open?

Are you interested in only the key item window, or other windows as well? You might need to state which ones specifically, as they may be different (probably not, but just in case)
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
1,905
Reaction score
911
First Language
Spanish
Primarily Uses
RMVXA
Code:
class Window_Base < Window
 def opening?
  return @opening
 end
end
drop that somewhere after Window_Base.
that variable is defined, by default, but not instanced for use outside of the class.
that should open it for use, read only.
access it by (window).opening?
 

BlueMage

Slime Lv99
Veteran
Joined
Apr 13, 2019
Messages
116
Reaction score
147
First Language
English
Primarily Uses
RMVX
Code:
class Window_Base < Window
 def opening?
  return @opening
 end
end
drop that somewhere after Window_Base.
that variable is defined, by default, but not instanced for use outside of the class.
that should open it for use, read only.
access it by (window).opening?
Thank you = D but what i want to know is, how can i access that (window) part.
For exampe in this case is KeyItem window.
I tried (Window_KeyItem).opening? and Window_KeyItem.opening? but both doesn't work
 

ZirconStorms

VX & VX Ace Scripts
Veteran
Joined
Dec 22, 2014
Messages
350
Reaction score
111
First Language
English
Primarily Uses
RMVXA
Thank you = D but what i want to know is, how can i access that (window) part.
For exampe in this case is KeyItem window.
I tried (Window_KeyItem).opening? and Window_KeyItem.opening? but both doesn't work
Thank you = D but what i want to know is, how can i access that (window) part.
For exampe in this case is KeyItem window.
I tried (Window_KeyItem).opening? and Window_KeyItem.opening? but both doesn't work
Does if @opening = false / true not work ?
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
1,905
Reaction score
911
First Language
Spanish
Primarily Uses
RMVXA
somewhere in the code there should be a line:

@windowname = Window_KeyItem.new(param, param, .....)

use @windowname.opening?
 

BlueMage

Slime Lv99
Veteran
Joined
Apr 13, 2019
Messages
116
Reaction score
147
First Language
English
Primarily Uses
RMVX
somewhere in the code there should be a line:

@windowname = Window_KeyItem.new(param, param, .....)

use @windowname.opening?
Ah, thank you very much! It's perfect!
 

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

Latest Threads

Latest Profile Posts

I am feeling better about my update schedule, I feel like I am actually getting consistent work done even if it isn’t big updates.
It's a joy to work on a well-made map. I am not regretting this commission in the least!
I'm currently being attacked by the RPG Maker Hydra: fixing one problem only to have two more rise to take its place.
Hey you! Yeah YOU! Whatcha doin' not backing up your projects? You a masochist or sumthin'? GO BACK UP YOUR PROJECTS! Sheeesh... Didn't think I'd hafta spell it out for yas.

Forum statistics

Threads
94,289
Messages
919,703
Members
124,028
Latest member
masel97
Top