If a frame in a loop is on... [SOLVED]

Started by theatrx, Thu 11/10/2007 05:50:03

Previous topic - Next topic

theatrx

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
Life is a banquet and most poor sonsofbitches are starving to death

monkey0506

Are you wanting something like:

Code: ags
if ((object[0].View == 88) && (object[0].Loop == 3) && (object[0].Frame == 2)) {
  // do stuff
  }

theatrx

You are brilliant!  I tried so many ways to do this but my operands were all messed up.  Thank you thank you thank you. 
Life is a banquet and most poor sonsofbitches are starving to death

monkey0506

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. :)

Dualnames

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.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

theatrx

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.
Life is a banquet and most poor sonsofbitches are starving to death

Dualnames

Anyway , carry on. And change the topic's title.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

SMF spam blocked by CleanTalk