Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: theatrx on Thu 11/10/2007 05:50:03

Title: If a frame in a loop is on... [SOLVED]
Post by: theatrx on Thu 11/10/2007 05:50:03
Is it possible to stop an animation if a frame in a loop is on?

sort of like

I don't know how to do this but

If object[0] is animating in view 88 and loop 3, frame 2 is visible when you click on it (but only when you click on it at this point)  can I change the graphic... stop the animation and change a graphical element "catbird1"?

I'm not sure how to script this.  theatrx
Title: Re: If a frame in a loop is on...
Post by: monkey0506 on Thu 11/10/2007 05:58:40
Are you wanting something like:

if ((object[0].View == 88) && (object[0].Loop == 3) && (object[0].Frame == 2)) {
  // do stuff
  }
Title: Re: If a frame in a loop is on...
Post by: theatrx on Thu 11/10/2007 14:11:30
You are brilliant!  I tried so many ways to do this but my operands were all messed up.  Thank you thank you thank you. 
Title: Re: If a frame in a loop is on...
Post by: monkey0506 on Thu 11/10/2007 18:13:57
That's part of why I'm such a fan of "unnecessary parentheses". If nothing else it makes sure you know which way the operands will be handled.

Happy to have helped you out. :)
Title: Re: If a frame in a loop is on...
Post by: Dualnames on Sat 13/10/2007 23:10:14
Wow theatrx and I thought since I thought you were pro at programming that your post would be much more complex. Shame on you. ;D Guess big minds can't solve small problems.
Title: Re: If a frame in a loop is on...
Post by: theatrx on Sun 14/10/2007 01:41:05
I'm not anywhere near a pro.  I am such a NOOB!  But, I've learned so much and met a lot of wonderful people here.  I think part of the problem is I work until I'm way too tired and then I get totally frustrated and don't see the obvious solution.
Title: Re: If a frame in a loop is on...
Post by: Dualnames on Mon 15/10/2007 15:36:29
Anyway , carry on. And change the topic's title.