Applying Wait

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.

Edit. Wrong place please remove as I repost in correct section
You can also just report your post and ask us to move it next time, but I'll close it since you already reposted.

Original thread: https://forums.rpgmakerweb.com/threads/applying-wait.85294/