Animation frame to trigger attribute

DigiChainDigiChain Member, PRO Posts: 1,288
edited November -1 in Working with GS (Mac)
Hi, I'm new here and just working on my first project - and have a question.

I have an actor, it is a simple looped animation consisting of 4 frames. When you click on it I want it to trigger an attribute dependent on the current frame it is displaying. So for example, if frame one is visible when you click, it'll move another actor left. Or if its frame 2 when you click it'll move that actor right etc.

Is this possible? Thanks

Comments

  • rlehmrlehm Member Posts: 320
    You will have to use timers to swap images instead of animate.

    In each image have the rule, attributes etc.

    Good luck
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    rlehm said:
    You will have to use timers to swap images instead of animate.

    In each image have the rule, attributes etc.

    Good luck

    No you dont.

    you can use the animation behavior and have rules when self image= whatever
  • DigiChainDigiChain Member, PRO Posts: 1,288
    Thanks Rlehm, I had thought that may be the case. Cheers
  • DigiChainDigiChain Member, PRO Posts: 1,288
    Ah - just refreshed and read your answer John. Thats great, I'll have a play and see if I can get it working!
    Cheers guys!
  • rlehmrlehm Member Posts: 320
    Thanks for the correction, John. I'll have to test that later.
  • rlehmrlehm Member Posts: 320
    I'm testing what John recommended above. It's not working for me at all. can anyone post a working example? Thanks.

    Edit: Could not have ".png" in the name.

    self.image is mainbomb.png WRONG

    self.image is mainbomb CORRECT
Sign In or Register to comment.