MV Script Call to see if player is navigating particular menu

yeahchris

Veteran
Veteran
Joined
Apr 14, 2020
Messages
86
Reaction score
23
First Language
English
Primarily Uses
RMMV
I have a HUD of sorts that I've designed that I would like to show, if possible, specifically when the player is navigating the menu in combat for a particular skill type.

Is there a script call that can return the menu that the player is in during battle?

The idea being that I do a check to see if that returned value matches a static value, and, if so, turn on the switch to which the HUD is tied.
 

Cormorant42

Veteran
Veteran
Joined
Sep 17, 2019
Messages
74
Reaction score
39
First Language
English
Primarily Uses
RMMV
You're going to have to find this yourself, because I'm too tired to delv through rpg_scenes.js for the specific script call that you're looking for. But I can give you some pointers on where to look and what to look for:

- The file you want to look in is either rpg_scenes.js or rpg_windows.js, depending on if you want it to be open during a certain menu or a certain part of a certain menu
- After glancing through rpg_scenes.js, since I'm betting that's what you want, I see a script call for "Scene_Base.prototype.isActive();" which will return a boolean value depending on whether the scene is active or not. Since that's a call for Scene_Base, it will almost always return true if the game is running (that's a guesstimate, I haven't checked that so don't fact check me)
- You'll probably want to find a version of the above script call that is specific to the scene that you want your HUD to be visible during

And I'm tired so that's all I can give you rn, hope it helps
 

xabileug

Veteran
Veteran
Joined
Jul 1, 2014
Messages
113
Reaction score
23
There's a plugin flash active window, i think it was japanese. It makes the active window pulse.
 

yeahchris

Veteran
Veteran
Joined
Apr 14, 2020
Messages
86
Reaction score
23
First Language
English
Primarily Uses
RMMV
You're going to have to find this yourself, because I'm too tired to delv through rpg_scenes.js for the specific script call that you're looking for. But I can give you some pointers on where to look and what to look for:

- The file you want to look in is either rpg_scenes.js or rpg_windows.js, depending on if you want it to be open during a certain menu or a certain part of a certain menu
- After glancing through rpg_scenes.js, since I'm betting that's what you want, I see a script call for "Scene_Base.prototype.isActive();" which will return a boolean value depending on whether the scene is active or not. Since that's a call for Scene_Base, it will almost always return true if the game is running (that's a guesstimate, I haven't checked that so don't fact check me)
- You'll probably want to find a version of the above script call that is specific to the scene that you want your HUD to be visible during

And I'm tired so that's all I can give you rn, hope it helps
Thanks! It's a start. I'll give it a shot, but my ability to parse javascript is fairly limited. However, a boolean value would be perfect.

I'm hoping to have it return true anytime you access the menu for a skill type I have created -- not just specific parts of the menu.

Why? I have a spellcaster's magic set up to consume reagents. The HUD is the number of reagents she has remaining. I just think it would be slick it it were visible to the player without having to use an ability to bring up the HUD and without it needlessly floating the HUD in battle over everyone else's turn.
 

yeahchris

Veteran
Veteran
Joined
Apr 14, 2020
Messages
86
Reaction score
23
First Language
English
Primarily Uses
RMMV
So.... found this.


Scene_Battle.prototype.isAnyInputWindowActive = function() {
return (this._partyCommandWindow.active ||
this._actorCommandWindow.active ||
this._skillWindow.active ||
this._itemWindow.active ||
this._actorWindow.active ||
this._enemyWindow.active);

But not finding anything that suggest how I could target a particular skill window. Would it be easier to try to target the battler whose turn it is maybe?
 

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

Latest Threads

Latest Posts

Latest Profile Posts

I love the Time Fantasy tiles, but haven't played anything made with it yet. Can anyone recommend me something?
Vote for what I show more indepth on Twitter tomorrow from the MZ default resources
Oh look, 12 more free Daz3D models. *adds them to his collection * Yes, the fools... Give it a few months and my collection will be crazy, all without paying a dime. I still have no idea if I'll ever learn the software, but hey... Just in case, these models are quite expensive. In two weeks, they've already given me almost $400 worth of free models. :LZSexcite:
Not easy to find DS resources, is it? I need to make a good compilation thread linking to all the artists that do DS...
Spent a whole evening planning Stats, Animations, Abilities of 24 different weapons.. Only to realize I was just Bloating the Game. In the end i decided to stick with only 6.

Forum statistics

Threads
99,351
Messages
964,373
Members
130,949
Latest member
MasterLink009
Top