Applying Wait

Indsh

Veteran
Veteran
Joined
Oct 11, 2015
Messages
225
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
31,365
Reaction score
7,675
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
225
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,076
Reaction score
854
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
225
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 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,867
Messages
1,017,061
Members
137,575
Latest member
akekaphol101
Top