How do I change animation after bought

0 favourites
  • 5 posts
From the Asset Store
Ninja char for your game! Make your own Shinobi game with this art.
  • Hi, I'm trying to use the coins earned in the game to spend on skins.

    I want to make the selection of the skin through an animation of a layout, which changes(unlock) after having bought the skin.

    The problem is when I click on the text field, I does not change the animation of the sprite in the options layout

    Event:

    on touched / Text "buy"

    Action:

    System / substract 1 from coin

    Sprite8 / set animation "second" play from beggining

  • Does the number of coins decreases?

    Please share your capx, it's hard to guess what could be causing the problem without it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Does the number of coins decreases?

    Please share your capx, it's hard to guess what could be causing the problem without it.

    Yes, it decreases.

    I did the capx again from 0, the frame change works. But not if I make a layout change, so it is blocked again and I can not use the animation until I buy it again.

    For example:

    Click on play, starts the game, get the cash coin, lose the life with the yellow box. Click on options, click on the unlock box, its turn to green and you can use the other skin. Click on play, it works.

    Now ... if you click on menu, then on options, the box is blocked again, so you have to buy it again, it does not remain permanently.

    Capx:

    ht tps://ufile. io/ymb7l

  • GabrielIq

    You need to save the skin in a global variable (or a dictionary). On start of another layout, set animation frame to skin variable.

  • Its works, thank you very much.

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