check if a window is opening?

BlueMage

Slime Lv99
Veteran
Joined
Apr 13, 2019
Messages
116
Reaction score
149
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
40,098
Reaction score
13,704
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
2,248
Reaction score
1,250
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
149
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

Veteran
Veteran
Joined
Dec 22, 2014
Messages
359
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
2,248
Reaction score
1,250
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
149
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 Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,575
Latest member
akekaphol101
Top