add 1 until it reaches value x

I want to slowly move the message box guys...
How can I gradually change x until it reaches 100...

Code:
for (i = 0; i < 100; i++) {
        this.x += i}
The code seems fine. But you wanna add i<=100 in the first line. Btw the message window's x is this: SceneManager._scene._messageWindow.x
Your code will add 4950 (99th triangular number) to "this" object's x. If it's a window then that probably means it'll go way off-screen. 😅

For the effect you're seeking, you should identify the appropriate update routine (called once per frame) and put your increment code in there. If you want it to happen when the window opens, for instance, you might try aliasing Window_Message.prototype.updateOpen. And remember to be careful of what you're adding/setting the coordinate to~ 😛
Edit!
@jjleroy I managed to do it with events. I tested it so it should work for you.
Capture.PNG
Replace '500' with whatever that suits your needs. Don't forget to put it in parallel process.
Edit!
@jjleroy I managed to do it with events. I tested it so it should work for you.
View attachment 123665
Replace '500' with whatever that suits your needs. Don't forget to put it in parallel process.
WHOA thank you!!!

Original thread: https://forums.rpgmakerweb.com/threads/add-1-until-it-reaches-value-x.113321/