Detecting an actor's image

8BitMichael8BitMichael Member, PRO Posts: 125
edited November -1 in Working with GS (Mac)
Is there any way to detect what image an actor is displaying while in the middle of an animation? For instance, if an actor is displaying "Image1.png" while colliding with the floor, destroy that actor. Thanks

Comments

  • firemaplegamesfiremaplegames Member Posts: 3,211
    You MIGHT be able to, it could be tricky in the middle of an animation. You do have access to the Image attribute of an Actor...

    Rule
    When all conditions are valid
    self.Image = "image1.png"
    -----[do something]

    That is how it would work. But it might be too fast to catch it during an animation. You can try it.

    You also might want to try breaking your animation up into chunks with Timers, something like this:

    Animate

    Timer After 0.2 seconds
    -----Animate

    Timer After 0.4 seconds
    -----Animate

    That way you can keep better track of what state the Actor is in.
  • 8BitMichael8BitMichael Member, PRO Posts: 125
    It was a pretty slow animation, so it worked. Thanks
Sign In or Register to comment.