Set different score to different animations?

0 favourites
  • 10 posts
From the Asset Store
This music pack covers differents situations for visual novels, anime games and many more!
  • I have created a random spawn object and separated them in animations. So at a random point on the layout it will spawn (Coins, Emeralds, Rubies, Sapphires) here is where I am puzzled.

    I am trying to separate the value of each animation on the score board.

    For example

    Coins = 1 point

    Emeralds = 5 points

    Rubies = 10 points

    etc

    I can't seem to separate the difference between the score and the animations. I don't want to create separate sprites as it would be easier just using one sprite with multiple animations on a spawn.

    This is the code I have...

    Every time I collect a emerald or ruby the score ends up with 6 added. It takes both codes and doubles the score. Does anyone know of a way I can do what I explained above using animations?

  • On the 'on collision' events you add a second condition 'item animation is playing' so the first one would be 'is playing animation coin' and the second one 'is playing animation emerald'.

    Also remove the set animation actions from those events, you don't need it and it might interfere.

  • On the 'on collision' events you add a second condition 'item animation is playing' so the first one would be 'is playing animation coin' and the second one 'is playing animation emerald'.

    Also remove the set animation actions from those events, you don't need it and it might interfere.

    Just tried this method it does not work. It is still doing the same thing. Doubling the scores.

  • Share the screenshot on how you set it up

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Share the screenshot on how you set it up

    I even tried moving them to outer layers and it just combines all the points no matter what animation is collected. If worse comes to worse I will just have to try a family method outside of animations.

  • So that should add 5 for a coin or 25 if its one of the other items and the outcome is what?

  • So that should add 5 for a coin or 25 if its one of the other items and the outcome is what?

    It also adds the score with coin.

    For example when I collect a ruby which is 20 points it also adds the 5 points of the coin. Where it should just add 20 points which is the value of a Ruby. It is doing the same with the other gems.. It is adding the value of the gem but also adding value of the coin on top of it.

  • Yes from your events it will do that, but I said to add a condition for coin 'is coin animation playing' separately.

  • So that should add 5 for a coin or 25 if its one of the other items and the outcome is what?

    I know what I got to do.. fixed! ... Thanks for that much appreciated.

  • Nice :)

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