move picture script call with wait until finish?

Amarok

Veteran
Veteran
Joined
Dec 15, 2016
Messages
294
Reaction score
712
First Language
Spanish
Primarily Uses
RMMV
hey there, been searching for this for days, but nothing i found actually works. I just want to be able to use the wait command in my own javascript functions, mainly so i can handle animations and all that.
The reason why i need this is because i use way more than 100 pictures at once and thus the editor is useless for this.
So yeah, how exactly do you tell the engine to "wait" until the picture has finished moving? (like you would do if you used the move picture command in the editor)

Thanks in advance!
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
1,956
Reaction score
648
First Language
Dutch
Primarily Uses
RMMV
this.wait(x) x being the wait. but in the editor, if you move a picture over 60 frames,
the wait is also 60 frames, but I dont know how to use that.

there are places to get the info you need though. if you try to search for
wait scriptcall or javascript rpg mv, you should get the info.

there is also information found here for scriptcalls and stuff used for javascript functions.
 

Amarok

Veteran
Veteran
Joined
Dec 15, 2016
Messages
294
Reaction score
712
First Language
Spanish
Primarily Uses
RMMV
@ShadowDragon i tried this.wait(x) but with no result, maybe because im calling the function from my own, within a for loop, no idea if it can be used like that, i guess not.
This is such a shame because i can do pretty much anything i want with picture commands, but this is the last bit of info i need to wrap everything up.
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,663
Reaction score
1,112
First Language
EN
Primarily Uses
RMMV
These wait routines are part of the event command interpreter. If you call your function via a Script command, that's a single command: the interpreter will run the associated code, then check its wait mode/timer stuff before moving onto the next command.

It sounds like you need to split your code into multiple consecutive commands, so that the interpreter has a chance to realise the picture is moving and wait for it before processing the next command?

Also, note that the this keyword is context-dependent. In a normal Script command in an event, this will reference the current event interpreter. In other contexts, you can try one of these:
JavaScript:
$gameMap._interpreter.wait(x);
$gameTroop._interpreter.wait(x);

Depending on the movements you're after, you might find a plugin like this helpful~
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Browsing through Steam's Curator Connect, it seems the vast majority of curators haven't curated in months. I'm guessing people finally got tired of reviewing games for free. Can't blame them.
Satisfy my curiosity for a sec please, folks: how many people actively followed/follow my Slip into Ruby or Jump into Javascript series and have found them useful for learning what makes RM tick?
Tried cooking some Pasta in the Microwave Oven. The Mixed herbs seasoning I sprinkled on top tasted kinda funny, Not sure why.
The youtube algorithm introduces me to the weirdest stuff these days. Last week I got bardcore music (which is awesome by the way), this week it is gun metal covers. Stupid as it is, I can't stop listening either. Who thinks to do this, and why is it so euphoric to watch?
Cracked black pepper turkey, smoked ham, three slices of pepperjack cheese. Sliced banana peppers, pepper relish, garlic aioli. Between two thick slices of sourdough.

Forum statistics

Threads
99,668
Messages
967,853
Members
131,348
Latest member
Galo
Top