move picture script call with wait until finish?

Amarok

Veteran
Veteran
Joined
Dec 15, 2016
Messages
294
Reaction score
723
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
2,895
Reaction score
1,029
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
723
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
2,088
Reaction score
1,508
First Language
EN
Primarily Uses
RMMZ
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

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,863
Messages
1,017,053
Members
137,571
Latest member
grr
Top