lockup when animation starts and gui is visible

Started by HandsFree, Wed 04/03/2015 00:04:16

Previous topic - Next topic

HandsFree

In some areas a blocking animation will play when 10 seconds have passed. This is done in the room's repexec.
But if at that time the inventory screen, or another gui, is visible the game locks up. Setting the gui to 'pause game when shown' makes no difference.

How do I make it so that the animation will not start while a gui is visible (and the counting of seconds is also stopped)?

Example: in the repexec of a room I have
Code: ags

iUnicorn++;
if (iUnicorn == 400) Scare_Unicorn();

And the Scare_Unicorn() function holds blocking animations.

Possibly related: is it possible to play two non-blocking animations after each other?

thanks

Gilbert

Try this:
Code: ags

if (!IsGamePaused()){
  iUnicorn++;
  if (iUnicorn == 400) Scare_Unicorn();
}


For the second question, yes, one way is to check the Animating property of an entity and start the second animation once the 1st animation is done.


SMF spam blocked by CleanTalk