Applying Wait

Indsh

Veteran
Veteran
Joined
Oct 11, 2015
Messages
222
Reaction score
65
First Language
English
Primarily Uses
N/A
I'm using a show animation script

$gamePlayer.requestAnimation(8);

And I would like it to wait until finished. In the script calls it shows

this.setWaitMode('animation');

I have tried a few things but don't know how to apply this practically.

Any help would be appricated.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,441
Reaction score
7,238
First Language
German
Primarily Uses
RMMV
The problem here is that on the Computer side, wait works differently than most people assume.

Time is basically handled by a main game loop, that processes everything.
The wait from the event code level becomes a "skip processing this event or element until conditioned x is met", with the condition being a number of frames having passed.

So you need to give the other game element, the one you want to wait, a command that the game loop recognizes as " pass this until ", the animation itself is the wrong place for the command.
And that is why the code talks about waitmodes and so on.

Sorry, I can't tell you what command or code you need in your special case, I just wanted to give you some background to understand what is going on in the engine when you give the wait command or use a wait option.
 

Indsh

Veteran
Veteran
Joined
Oct 11, 2015
Messages
222
Reaction score
65
First Language
English
Primarily Uses
N/A
I apprciate the answer.

In my actully game I can just put a normal "wait" command, but it doesn't quite work the same.
Really I am trying to find this answer out of curiosity as I assume it will lead to more findings so hopefully someone has it!

Cheers @Andar
 

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
1,063
Reaction score
828
First Language
English
Primarily Uses
RMMV
You almost had it working. You will need to tell the Game Interpreter what character is currently playing the animation.

Code:
$gamePlayer.requestAnimation(8);
this._character = $gamePlayer;
this.setWaitMode('animation');
 

Indsh

Veteran
Veteran
Joined
Oct 11, 2015
Messages
222
Reaction score
65
First Language
English
Primarily Uses
N/A
And that was the learning I was talking about! thank you very much @Ossra

This thread can be closed
 

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

Latest Threads

Latest Profile Posts

So yesterday I got a follower (follow my NSFW art account) who dmed me and said to me :
if you continue to be friends with [name of the artists] which make me uncomfortable I will have to unfollow and I am like :
... do it?
Did I add too many?? Is there such a thing?

Rabbit's Shop I've been reworking. Still some dated graphics but 99% satisfied I think.:kaophew:
Traps, detecting traps, and disarming traps including treasure traps have now been implemented into my Might and Magic-inspired project. If you don't want to get hurt, you better have a character who focuses on the perception skill, and you better have a character who focuses on the disarm skill!

Done tinkering a project idea for MZ, time to make a little document and wait for the release... :kaoswt:

Forum statistics

Threads
100,833
Messages
980,068
Members
132,480
Latest member
asuraguy
Top