How do i add a score to Ping Pong game?

0 favourites
  • 4 posts
From the Asset Store
Customize the animation of character when item changed
  • It's like a retro ping-pong game. I want to add a score to the game and to and to end the game after 5 wins.

    TNX!

  • Wherever the ball goes to award the win, add 1 to a global variable for player score. When GV is 5 then end the game.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • generally ill add an invisble box, when ball collides w box destroy ball, add +1 to playerx score. as youve 2 players youd have player1 score and player 2 score. then have a game ender function; If playerx score Greater or equal to EndGameScore, set variable to win/lose, set text to you win/you lose, wait x seconds, reset global variables, restart layout.

    can add a do you want to retry or continue option but thats the basics.

  • on ball collision box 1 add +1score to player 2, on ball collision box 2 +1 score player one

    have 2 text object set up, every tick>set text>player1score , etc so it always displays the proper score

    at end game you would probably want to set ball speed to 0 or disabled so it stops moving, preventing a late score, and a win counting as a loss or vice versa

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