How do I save the animation frame

0 favourites
  • 5 posts
From the Asset Store
Selection Frame
$0.25 USD
95% off
Selection frame like in RTS games, works both on mobile and desktop devices.
  • Evening folks,

    So as i'm working on this project of mine, i'm trying to play around with the animations of a sprite.

    My problem seems to be:

    Can't get the game to remember the frame, it always turns the frame back to normal.

    e.g: I want to change the skin of a character. Pressing a button, allows you to change the skin ( im using drag and drop behaviour)

    Whenever the person holds his finger on the character, he's able to drag it around but as soon as he lets go with his finger, the character returns back to starting position.

    The person just spend "e.g" 50 coins, buying this skin. it's sad if the person has to buy the skin again, just because he lets go with his finger.

    Question is: how do i make the animation STAY at last bought skin ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You have stopped the animation ? If you don't if you set the frame it should run the animation from there.

  • This is what i got.

    Ain't working....

    As soon as i let go of the character, the frame is set back to " 0 " and the player has to buy the skin again.

  • Never mind.

    I manage to solve it by making a Global Variable, controlling what frame to use.

  • It does work - I use something similar in my Jam game - I think there's a fault in your code. Setting the animation itself I think undoes this.

    I would also make it an instance variable of Character, as it's a property of it.

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