interfere with animated action

Started by spook1, Thu 18/03/2004 22:14:52

Previous topic - Next topic

spook1

In my game at e certain point you find a pot of boiling substance. you have to take it of the fire, before it explodes.

I cannot script this.

If I do not use animateobjectex(..,..,..,..,..,1); to block the animation I cannot see the animation.

When I do block it, it plays all the way down to the explosion.

is there a a way to stop an animation halfway??

here is what i tried:

   if(viewnumber == 1){
//Display("startniceboiling");
       Wait(60);
       i=1;
       while(i<2){
       SetObjectView(0,10);
       AnimateObjectEx(0,0,10,0,0,1);  // nice boiling
       i++;
       }
       Display("Nice boiling starmix is ready!! You are wonderfull.");
      }
      if(viewnumber == 2){
//Display("startexplosion");
       i=1;
       SetObjectView(0,10);
//            while(i<150){
              AnimateObjectEx(0,1,10,0,0,1);
//          i++;
//          Wait(1);
//       }
       
           Display("Game over");
       QuitGame(0);
      }   

thanks in advance

Darth Mandarb

I think your best bet would be to set a timer when the room loads.

If you don't have the object in inventory before the timer expires you play the explosion.

If you get the item before the timer expires you disable the timer.

Look up 'SetTimer' in the help file.  It's pretty easy to understand.

Good luck!

~ d

spook1

OK, but my next problem is: I cannot perform any action while animation is running at the same time.

How can I start an animation but stop it (e.g. by obtaining an invetory) before it is finished?

Scorpiorus

QuoteHow can I start an animation but stop it (e.g. by obtaining an invetory) before it is finished?
What if you try SetObjectView (0, 10). That should stop it.

~Cheers


SMF spam blocked by CleanTalk