How do I set the score

0 favourites
  • 6 posts
From the Asset Store
Create the right kind of drama with Film Scoring Tools sound library!
  • in my game theres a ball bouncing and i want everytime i colide with the ball it bounces away and i get 1 point. did it like this. "me > on collision with > ball> value add 1 to score" but the problem is that somethimes i collide with the ball and push it away and meanwhile im pushing the ball the score goes crazy, like hundreds of points, because they are still in touch.

    how can i tell my game not to score hundred of points when i collide and collision is still happening but only 1 point?

    i dont want to put something like wait x seconds because sometimes it's not just a brief moment that i'm pushing the ball, and also e.g. if i got wait 0.5 seconds and i hit the ball after 0.3, i would not be givven that point

  • Turn off the ball colission for a short time or use a different scoring system.

    If you score on collision then it will score every collision unless you turn off collisions.

  • Turn off the ball colission for a short time or use a different scoring system.

    If you score on collision then it will score every collision unless you turn off collisions.

    no other way to do this comes to mind?

  • > Turn off the ball colission for a short time or use a different scoring system.

    >

    > If you score on collision then it will score every collision unless you turn off collisions.

    >

    no other way to do this comes to mind?

    Not if you are using collisions for scoring.

    You can change the game so the player has to go touch a wall or a spot before hitting the ball or the ball has to hit a wall or something before another score is registered.

    Make it harder to get a score.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ball on collision with object wait 0.01 add score 1

    make sure the scoring is at the bottom of the entire event system, so the wait wont affect other events.

  • I would use a value to track contact

    Like on contact,

    [ if 'touching' = 0, score+=1 touching=2 ]

    If touching >0, touching -=1

    That way the contact is continually renewed and wont allow a new score addition until contact breaks and 2 ticks have occurred (which is usually a tiny, tiny amount of time)

    Good luck!

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