Timer that follows margin

0 favourites
  • 5 posts
From the Asset Store
Tabata timer
$9.99 USD
Template for Tabata timer, fully documented in comments and video
  • Hello,

    How do I make a timer that counts up to measure time (score)

    that follows the margin since i am making a platforming game.

    How do I also make it reset everytime I click 'space' and pause when I touch a specific object?

  • First make a layer for the timer, and set the parallax to 0 so that it will not move when the view does. Position your text where you want to show the time measure (score.) The dotted line represents the border of the players view, so use that to reference where you want the timer to always stay. Also add a "keyboard" object to your project so you can map the spacebar action later

    In the event sheet make a variable "score". Make an event with a condition of every x seconds, and use the amount of seconds you want to pass before another point is added to the score. make another condition for the object to not be touching (overlapping) whatever object you want it to pause et. Make an action for your text box that will display the score and set it to "add to variable" action. Select the amount you want the score to change by with each second passed.

    For instance,

    every 1 second            | add +1 to "score"

    is not overlapping object |

    Make a second event that is "every tick", and give that an action using the text box you made for score set the text to "score".

    for instance:

    every tick | set text to "score"

    make a third event with the keyboard condition "on pressed" and select spacebar as the button that should be pressed. give the event an action of setting the variable "score" to 0. This will make it so that whenever you press spacebar you will have the score reset to 0

  • I'm a little confused on the ' In the event sheet make a variable "score". Make an event with a condition of every x seconds, and use the amount of seconds you want to pass before another point is added to the score. part. When I go to the event sheet and add an event to the score, what event do i add to it?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Make a variable "score"

    Make an event. Give that event a system condition of "every x seconds." Set the amount of seconds will pass to the amount of time between adding to score. Give the event a system action "Add To Variable". Make it add to "score" and set the number it adds to how much you want it to go up by every time the event plays.

    Whatever you set the time to for every x seconds, is how often it will add to score. Whatever you set the add to score value to will be how much it increases.

    For instance, every second add 1 to score would make it add 1 to score each second that passes.

    Here is an example of what I am talking about:

    http://dl.dropbox.com/u/30187917/plaatforming_with_score.capx

  • Thanks, I got as far as putting the timer there and getting it to work and everything though I had one issue with adding the make a third event with the keyboard condition "on pressed" and select spacebar as the button that should be pressed. give the event an action of setting the variable "score" to 0. This will make it so that whenever you press spacebar you will have the score reset to 0. I cannot find any variable when I try to add the event.

    Here's how far I got: dl.dropbox.com/u/75406771/timerattempt/konngam.capx

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