How do I create a Starting Countdown like Racing Game?

0 favourites
  • 11 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • Hello Construct 2 Experts,

    I'm trying to make a racing game using Construct 2, usually in racing game, before they started the race, they have a countdown like " 3 , 2 , 1 , GO!! " right ??... So any idea how to make that countdown?

    Currently my game, after press "PLAY" button in the start page, the car usually straight to move. But now i want it to pause for a while until the countdown is done then the car will move.

    Hope you guys get the picture and understand what i intend to do.

    Looking forward for your reply.

    Kindly Regards,

    Razuan

    Beginner Game Developer

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There are two ways that spring to mind:

    Either when racing starts you use [ System>Set time scale ] to set the time scale to 0 - which will pause the game. You can then update the counter (either a sprite with animation frames, or a text object) using [ System>Every X Seconds ], and when the counter hits 'Go' or 'Race' or whatever, set the timescale back to 1. The disadvantage here is that animations won't run whilst the timer counts down.

    Alternatively, you could disable the parts of your game that allow racing to take place (so disable the car behaviour on the player and other racers, and hold any timers you might be running, until the timer has counted down. At which point you enable the car behaviours etc. This way animations can still be run - but depending on the complexity of your game this could be a lot more work.

  • For a more accurate answer, consider posting your actual capx because we don't know how your car is set up and how to "pause" it.

    A solution though should be to have a "InGame" global variable which is by default set to 0 and an event that says that if InGame=0, then car is paused (as well as any other element of your game that need to be "paused" in whatever way this can be done).

    At the end of your countdown, set InGame to 1 and so your car will move.

    A global timescale is some idea, but could prevent the actual countdown from going on.

    Although you can always set a specific object timescale to 1 thanks to the "Set object time scale" system action.

  • Hi mrtumbles & Kyatric, thank you for your reply. Im really sorry but i think i coudnt imagine or get the memo how to do it just like you guys told.

    The way you said, is it i need to do a different Event Sheet ? or the same Game Sheet.

    Yes, maybe i will post along my .capx so that you guys could see my game. Actually the idea i get from Flappy Bird. I made this for my assignment actually.

  • For a more accurate answer, consider posting your actual capx because we don't know how your car is set up and how to "pause" it.

    A solution though should be to have a "InGame" global variable which is by default set to 0 and an event that says that if InGame=0, then car is paused (as well as any other element of your game that need to be "paused" in whatever way this can be done).

    At the end of your countdown, set InGame to 1 and so your car will move.

    A global timescale is some idea, but could prevent the actual countdown from going on.

    Although you can always set a specific object timescale to 1 thanks to the "Set object time scale" scirra.com/manual/125/system-actions system action.

    Hi Kyatric, how to upload my .capx ? i coudnt find the way to upload it.

  • Host it on a service like dropbox or google drive and put the link in your post as plain text.

    Be sure to try and get enough reputation to prevent the spam filter from removing links from your post.

    And yes, this is all done through the event sheet.

  • drive.google.com/open ... kxDVHJ2dTg

    Hi, sorry for the late reply, above is my capx file. You can view it and hope you could imagine how i intend to do. Hope you could help. Looking forward for your reply. Thank you.

  • Notice how your URL is not complete => Can't download your capx.

  • Notice how your URL is not complete => Can't download your capx.

    Im so sorry, my bad. Hope this one works.

    drive.google.com/open

  • Fixed capx

    For the explanation refer to the previous posts and the quick comments in the code.

  • dl.dropboxusercontent.com/u/36472942/construct/forumhelp/Countdown_pause_action.capx Fixed capx

    For the explanation refer to the previous posts and the quick comments in the code.

    Wow! I'm so impress of your work on the project. Really you did just like i wanted. You are great ! Thank you so much. *double thumbs up*

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