How do I get the game to animate automatically?

Started by CountGiuseppe, Sun 13/03/2005 03:50:33

Previous topic - Next topic

CountGiuseppe

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.
  ???

Ponch

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

Scummbuddy

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.
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

SMF spam blocked by CleanTalk