Help with Battle Status window

kultie

Villager
Member
Joined
Jul 2, 2018
Messages
14
Reaction score
1
First Language
English
Primarily Uses
RMMV
I'm making my own battle status window extending from Window_Base class and want the status window moving at battle start.
I can't seem to find the script that move this window at the start of battle.
Remove the function of Window.prototype.move the window still move.
Setting the position x of the window only make the moving resolve from left to right or right to left. If leave x = 0 the window stay but i want the x to be 500 (Top-right of battle scene). :kaolivid:
Set y is fine tho!
Can anyone help me with this? :kaocry:
 

Silva

Scoobityboo
Veteran
Joined
Nov 5, 2018
Messages
399
Reaction score
221
First Language
English
Primarily Uses
RMMV
You might want to take a look at this function:

Code:
Scene_Battle.prototype.updateWindowPositions = function() {
    var statusX = 0;
    if (BattleManager.isInputting()) {
        statusX = this._partyCommandWindow.width;
    } else {
        statusX = this._partyCommandWindow.width / 2;
    }
    if (this._statusWindow.x < statusX) {
        this._statusWindow.x += 16;
        if (this._statusWindow.x > statusX) {
            this._statusWindow.x = statusX;
        }
    }
    if (this._statusWindow.x > statusX) {
        this._statusWindow.x -= 16;
        if (this._statusWindow.x < statusX) {
            this._statusWindow.x = statusX;
        }
    }
};
This is what's repositioning the status window in the default engine, so you may need to adjust this to your needs.

It's possible to move windows by directly assigning to their x and y properties so removing the "move" method doesn't promise that the window will remain fixed (as evidenced in the above function).
 

kultie

Villager
Member
Joined
Jul 2, 2018
Messages
14
Reaction score
1
First Language
English
Primarily Uses
RMMV
@Silva yep that what i looking for. Thank you so much:kaojoy:
@Papillon Thanks but i'm looking for stoping the sliding animation not making one :kaoblush:
 

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

Latest Threads

Latest Profile Posts

Tomorrow is Thanksgiving, and I'm so excited! I've been exploring MZ a little, and I just downloaded Effekseer to make new animations. I have experience in 3D animation software, so I'll be pretty good at the whole "particle" thing. My first game on MZ will be Fantasy Force--starring a griffin, a dragon, and a pegasus fighting against the Dragon of Darkness.
currently listening to Driftwood Gaming streaming some MZ dev time and it's delightful! had no idea they were this entertaining, love it
In quarantine, will be tested soon. This year is really something... special.
I was at another orientation yesterday and I realized I'll be working with an old friend! We met at the local water park a few years back and it was so nice to see her again! We had a chat, and next week when I officially start, I'll see if maybe we can trade our Zoom IDs so we can talk!
I made some sideview closets for MV!
You can find them in my MV resource thread.

Forum statistics

Threads
105,514
Messages
1,014,343
Members
137,198
Latest member
mmc1980
Top