Move a window on update

Lets consider the following from Window_Map:

Window_MapName.prototype.update = function() { Window_Base.prototype.update.call(this); if (this._showCount > 0 && $gameMap.isNameDisplayEnabled()) { this.updateFadeIn(); this._showCount--; } else { this.updateFadeOut(); }};Now lets say I wanted to move this down on the y Axis 100

Ok:

Window_MapName.prototype.update = function() { Window_Base.prototype.update.call(this); if (this._showCount > 0 && $gameMap.isNameDisplayEnabled()) { this.updateFadeIn(); this.y += 100; // This should do it right? No... this._showCount--; } else { this.updateFadeOut(); }};The above adds: this.y += 100; But when the game starts and the name is shown all it does is just sit there, at 0, 0. It never moves down like I told it too .... 

Why?

How do you get a window to move on update to a new location? I have even tried .move(0, 100, 100, 100); Still the window does not move.
Too late a night to think. You can try putting the original update call after your code instead of before it.

Window_MapName.prototype.update = function() { Window_Base.prototype.update.call(this); if (this._showCount > 0 && $gameMap.isNameDisplayEnabled()) { this.updateFadeIn(); this.y += 100; // This should do it right? No... this._showCount--; } else { this.updateFadeOut(); }this.drawSomething(x, y, width);};As long as your are drawing something each time in your update I am not sure whats wrong I will test on some of my own windows to see if I can move them.

Edit2: All it is doing for me in moving my contents down but not the whole window.
that doesn't make any difference. 
this.move works for me maybe it has to do with your other code?

do a console.log and see if your y value is changing
It does change. But the window fades in and then fades out. With out ever moving ...  there is no custom code I was playing with the core script to see if I could make a window that fades in and out move. So I did:

this.move(0, this._y, 360, this.fittingHeight(1));

this._y += 3;

in the core initialize method I set this._y = 3;

In the console, this.y changes rather quickly up to about 525, but the actual window never moves ... 
I don't think  I know what the issue is. Some other people need to chime in.
Last suggestion would be to remove all code except for y changing code and the this.move code.

Maybe the fadeIn and fadeOut is messing things up.
This is really frustrating, windows have to redraw upon there update method - no? so I should be able to move it on windows update.
Hmmm you're changing the position after it's already drawn, that might have an effect (like maybe it won't be re-positioned unless it's redrawn). Check what the default update function does as it might be resetting the y change.
Theres nothing in the classes going all the up to Window, that would reset the y axis
Wait, I realized I have MV now. I'm gonna check it
Ok Awesome thanks
I just tried it and it worked for me... Added it as a plug-in in my project


I used 10 instead of 100 though, because 100 made it so that I didn't even see the window...


Here's what I did:

Spoiler
Copied your code


Pasted in notepad


Saved as .js file in my project's plug in folder


Opened the project


Opened Plug in manager


Activated the plug in


Tested


I didn't see a window


Went back to the js file


Changed 100 to 10


Tested


I saw the window and it now scrolls downward
PS: It's a clean project btw, only this plug-in is currently loaded.
Can you post a sample of code to show how to move a window because I tried with this.move and it doesn't move, the y axis does get updated, the window fades in, fades out. The y axis updates but the window never moves.
Here's an edited version (Overwrite)

Spoiler
 
/*: * @plugindesc Rawr. * @author None * * @param Offset * @desc The value of the y offset. * @default 1*/Window_MapName.prototype.update = function() { Window_Base.prototype.update.call(this); if (this._showCount > 0 && $gameMap.isNameDisplayEnabled()) { this.updateFadeIn(); this.y += parseFloat(PluginManager.parameters('Window_Map')['Offset']); this._showCount--; } else { this.updateFadeOut(); }};
Here's an "alias" version

Spoiler
/*: * @plugindesc Rawr. * @author None * * @param Offset * @desc The value of the y offset. * @default 1*/var old_mapName = Window_MapName.prototype.update; Window_MapName.prototype.update = function() { old_mapName.call(this); if (this._showCount > 0 && $gameMap.isNameDisplayEnabled()) { this.y += parseFloat(PluginManager.parameters('Window_Map')['Offset']); }};
It works for me, as long as you don't forget to actually import it to your project, so make sure you import it using the plug in manager

PS: I edited it to use a parameter instead of a fixed number because I wanted to know how to use parameters. But it works even if you just use a fixed number
I've moved this thread to Javascript/Plugin Support (since you are not actually discussing the plugin you are developing, but only the approach to a very specific part of it). Please be sure to post your threads in the correct forum next time. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/move-a-window-on-update.48637/