How do I kill, animate and display points

0 favourites
  • 10 posts
From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • Hi,

    I am trying to create a small game which you can test on http://candywebwork.com/game

    It is an auto runner type of game, and in need of your help.

    1. How do i kill the crab on falling down?

    2. How can i display points with fading animation 1point for coins. 2points for cup cakes and juice and 10points for the treasure box?

    Please help me in completing this game.

    Thank you

  • Anyone please?

  • If you don't need the crab to be "bound to layout" you could just remove this behavior and check if it is on the layout, killing it otherwise.

  • As for the "crab killing" you should do what BrunoPalermo said. Just destroy it once out of the layout.

    ( Crab = Outside of Layout > Destroy ).

    As for the points, if i get it right, you just should set a Sine behaviour on the points image or text.

    Set Sine to Opacity and play around with it a little.

  • 2. How can i display points with fading animation 1point for coins. 2points for cup cakes and juice and 10points for the treasure box?

    Add a SpriteFont object, maybe call it PlusPoints and limit it to characters 0123456789+

    Give it the Fade behaviour (1 sec fade out time, destroy after fade out)

    Then do:

    Player->On collision with Coin
       Coin->Spawn PlusPoints
       PlusPoints->Set text to "+1"
       System->Add 1 to GlobalPoints
       Points->Set text to "" & GlobalPoints
       Coin->Destroy
    [/code:ym102eg8]
    
    This will pop up text with "+1" at the location of the coin and destroy the coin. The text will fade out and disappear. It will also update the GlobalPoints variable (or whatever you use to keep track of points) and update the Points display (assuming you have a Text/SpriteFont called Points to display points)
    
    Repeat and edit for cup cakes, juice and treasure boxes.
    
    If you had the paid version you could simplify it by using a Family for bonus point items, with an instance variable for the points they give.
  • Thank you for the solutions, i will implement them and if anything goes wrong i'll get back for your help.

  • I couldn't fine some options.

    Attached is the test file please check.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What option do you miss ?

    It appears you display points and have them fading as you asked.

    Your player gets destroyed as well when it goes outside of layout.

    If you want it to do more, add more code/actions in the event "Player is outside of layout".

    Or possibly ask a more precise question explaining EXACTLY what you want to achieve and what you see happening in your capx instead. This will help us to help you.

  • khaan

    I've modified your capx to include the actions I outlined above.

    Maybe it will be easier for you to see them this way.

    You might also want to go through some of the beginner tutorials.

  • OddConfection: Thank you so much this is perfect as i wanted. Surely i need to check more beginner tutorials.

    Thank you once again.

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