If you just need game update running, but keep player unable to progress the game, you could try following solution:
Player.LockView(2);
Player.Animate(1,5,eOnce,eNoBlock);
while (Player.Animating)
{
Wait(1); // wait minimal time to update the game in background and keep checking if it's still animating
};
Player.UnlockView();
This runs the Wait(1) in the loop until animation finishes.
If on another hand you want to simply run the animation for some time while player can continue to play the game, for that case there's
repeatedly_execute and similar functions, where you test when something ended or happened. These functions runs periodically, and eventually the condition will be met.
Something like that:
function repeatedly_execute()
{
// if player is locked in View 2 and not animating anymore, then unlock the view
if (!Player.Animating && player.View == 2)
{
Player.UnlockView();
}
}
Note that in the room script "repeatedly_execute" does not work, and you have to instead use room's event.