Arctica

Veteran
Veteran
Joined
Jul 19, 2021
Messages
116
Reaction score
156
First Language
English
Primarily Uses
RMMZ
I'm not sure why it's not appearing in game like the other windows(partyCommand, ActorCommand and the StatusWindow (character faces, names, hp/mp/tp, etc), despite writing the methods in an almost identical way. I suspect it has to do with the windows not actually being added, though the createxxxWindow() would suggest otherwise. I know how to move, resize, add rows, columns, etc existing windows. According to Scene_Base, these are added to the scene via addChild() method (inside addWindow()).



JavaScript:
const _Scene_Battle_ = Scene_Battle.prototype.createAllWindows;

Scene_Battle.prototype.createAllWindows = function() {
    _Scene_Battle_.apply(this, arguments);
    this.createScanWindow();
};
   

Scene_Battle.prototype.createScanWindow = function() {
    const rect = this.scanWindowRect();
    const scanWindow = new Window_BattleStatus(rect);
    this.addWindow(scanWindow);
    this._scanWindow = scanWindow;
};

Scene_Battle.prototype.scanWindowRect = function() {
    const ww = 192
    const wh = this.windowAreaHeight();
    const wx = 0;
    const wy = Graphics.boxHeight - 100;
    return new Rectangle(wx, wy, ww, wh);
};
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
3,054
Reaction score
2,368
First Language
EN
Primarily Uses
RMMZ
It's OK, the window is there, it just needs to be opened: Window_BattleStatus starts closed.

To make the scan window start in an open state, you can add this line to the end of your createScanWindow method:
JavaScript:
    this._scanWindow.open();
The usual status window is opened/closed via the updateStatusWindowVisibility method of Scene_Battle.
 

Arctica

Veteran
Veteran
Joined
Jul 19, 2021
Messages
116
Reaction score
156
First Language
English
Primarily Uses
RMMZ
Thank you, that took care of the problem.
 

Latest Threads

Latest Posts

Latest Profile Posts

So, I've been wanting to do this randomized logic puzzle in my game for years now. I finally figured out how to do it by using arrays and a few small script calls. It's based on the Einstein Fish Puzzle! :D Though, I have no idea how to actually have the player put in answers.... might start a thread about it.

The projectiles shown in this video are as follows:
1, Basic Triple
2, 30-Degree Arc
3, Randomized Blast Wave
4, 8-way
5, 8-way Double
6, 8-way Slowness
7, 120-Degree Arc Repetitive
8, Projective Triple
9, Split 8-way
10, 2-way Split Randomized Arc
11, HP-MP Split Arc
12, Split Laser
13, Shock
14, Cosine
Drop shadows and water reflections tests in RPG Maker VX Ace


BgI3F80.png
I'm doing a fairy tale project Little Red Riding Hood and the Woodsman. I'm almost done with the demo in my native language and I intend to make a demo version in English as well. I'm just going to use the translator because I don't know the pronunciations very well, I only know how to say "Hey" and nothing else.. :kaoswt2:

Forum statistics

Threads
118,617
Messages
1,117,362
Members
155,700
Latest member
Leomomr
Top