Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Sun 13/03/2005 03:50:33

Title: How do I get the game to animate automatically?
Post by: on Sun 13/03/2005 03:50:33
How do i get and object to animate as soon as i enter the room. And how do i animate the object after a certain time.
  ???
Title: Re: ANIMATE AUTOMATICLY ????????
Post by: Ponch on Sun 13/03/2005 05:46:09
AnimateObject  to animate the object on room load (check the manual for all the parameters pertinent to the animation you require).

As for animate the object after a certain amount of time - if it's for a cutscene, just use the Wait command before using AnimateObject. If it's something you want to have happen in the background while the player is exploring the room, use a Timer and a repeatedly_execute check. (Again, this is in the manual.) The code might look something like this:

Player enters screen (after fade in):
SetTimer(1, 100);

repeatedly execute:
if (IsTimerExpired(1) == 1) {
  AnimateObject(x, x, x, x);
}

That should do the trick.

Ponch
Title: Re: How do I get the game to animate automatically?
Post by: Scummbuddy on Mon 14/03/2005 01:06:20
Welcome to the boards, but please do not post in all caps, or make subject lines in all caps, nor use 5 to 20 smileys in a post. Thank you.