Help With Sequential Animations

0 favourites
  • 4 posts
From the Asset Store
3 pixel charaters with over 8 animations each + animations with a gun
  • Hey everyone.

    I have managed to figure out how to get an animation to play forward (when someone clicks on an empty sprite box on the right side of the screen) and then in reverse (When the player clicks on an alternate empty sprite box on the left). Basically, I created two separate animations within the Sprite object...I named the 1st one "forward" and then I created another animation and reversed the order of the frames so when it's run it runs the sequence in reverse which I creatively titled "reverse".

    On my event sheet I have an "on start of layout" event that stops the animation at the initial frame.

    Then I have an "on touched" event associated with the right hand empty sprite box that sets the animation to "forward" (Play from beginning) and another "On Touched" event (tied to the left hand empty sprite)that effectively plays the reverse version of the sprite object when clicked/touched.

    Now here is my problem: I have multiple Sprites (with a "Forward" and "Reverse" animation) for this layout and desperately need to figure out a way to have the the Sprites swap out in a sequential manner depending on which sprite was just played and which animation played.

    For example - The animation is for sprite A is halted on frame 1. The user clicks the right hand empty sprite object which fires off the "forward" sprite animation (of Sprite A) which after running at the designated FPS halts on the last frame. This last frame of the "Forward" animation of Sprite A is the also the first frame of the "Forward" animation associated with Sprite B so the transition is seamless but I need Sprite A to be hidden on the end of the "on clicked" and Sprite B made visible (and in a stopped state) on its initial frame. THEN when the user clicks the right hand empty sprite box again the "forward" animation of Sprite B plays and ends in an identical fashion to Sprite A which transitions seamlessly into sprite C's Forward animation when the right hand empty sprite box is clicked a 3rd time....and so on and so forth.

    Inversely, I also need the Left hand empty sprite boxes to manage the sequential playback of the "reverse" animations of each sprite depending upon which sprite is currently visible.

    I hope this makes sense and a GREATLY appreciate any help you guys can provide.

    R/s

    Elemental Entertainment LLC

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • why do you need to swap the sprites? you can have all the animations in only one sprite.

    i think you need to destroy the sprite a in the last frame and then spawn sprite b in the last position of sprite a.

  • I suppose I could do it as one large animation but doing it this way lets me have forward and backward for each segment which is vital for this project. If you know a way to code it using one large sprite where I some how designate a frame range per on-touch (either forward or backward) I would be happy to try it. ;)

  • E2GameStudios:

    Could you possibly explain how you were able to reverse your sprite animation. If you can help this would really help me with memory and size issues. Not to mention not having to create both a forward and reverse sprite sheet.

    Any help is deeply appreciated. Thanks.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)