Animation frame Action?

TouchTiltGamesTouchTiltGames Member Posts: 1,162
edited November -1 in Working with GS (Mac)
Trying to figure out how to say: If the last frame of an animation collides with an actor, destroy actor or change actor attributes.

Is it possible to specify an animation frame to cause an action other than using a Timer?

thanks in advance :)

Comments

  • IntelligentDesignerIntelligentDesigner Member Posts: 517
    Does it have to be the exact last frame? Maybe you could change image the actor to a static image of the last frame when the animation runs its course, and use that?
  • TouchTiltGamesTouchTiltGames Member Posts: 1,162
    I wondered what "Change Image" was, so you can place a Change Image in an animation sequence and the Change Image can be a different size? That would work if so...
  • QuinnZoneStudiosQuinnZoneStudios Member Posts: 452
    I think using change image should work for what you want to do. I used it for a five frame animation sequence using timers for each image for my giant fly swatter (as opposed to using animation sequence). It works well as I wanted a collision square at the end of the swatter only. The collision was tracked to be in the correct position for each frame. This way each image can be whatever you want it to be, anywhere and any size. I suppose you could break your animation sequence up and at specific intervals swap it out for your new image. Otherwise just try Change Image.
    Hope that works for you :-)
    Mike
  • TouchTiltGamesTouchTiltGames Member Posts: 1,162
    Ok so with Change Image, I have a 30 frame animation with a Timer and I want the last frame to change, so do I need to setup another Timer with the same amount of time +0.1 and then the Change Image?
  • QuinnZoneStudiosQuinnZoneStudios Member Posts: 452
    Well let's see here,
    Does your animation stop/pause after 30 frames or continue to loop until it collides with something? If the latter is true, you could just create an invisible actor, constrain it to your animated actor and put a timer on that, instead of the visible one.
    Put all your collision rules, behaviors, timers and attributes on that. Also if you need to control or switch out animation you can use that invisible actor for those also.

    Does that make sense, or does anyone have any better ideas?

    Hope that helps,
  • TouchTiltGamesTouchTiltGames Member Posts: 1,162
    Thanks Mike, it stops at 30 so I had thought that one could use the change image, which is a different size than the frames in the animation.

    I will try a constrain too.

    cheers,
    shane
Sign In or Register to comment.