Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: HandsFree on Wed 04/03/2015 00:04:16

Title: lockup when animation starts and gui is visible
Post by: HandsFree on Wed 04/03/2015 00:04:16
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) Select

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
Title: Re: lockup when animation starts and gui is visible
Post by: Gilbert on Wed 04/03/2015 02:16:32
Try this:
Code (ags) Select

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.
Title: Re: lockup when animation starts and gui is visible
Post by: HandsFree on Wed 04/03/2015 16:26:54
Yes of course.Thanks.