I can't tell time

This forum is currently in read-only mode.
From the Asset Store
An educational game for Times Table. An easy to use template for developers to build larger games
  • So I've been working on an American Football clock. The code I created is a bit complicated, but you don't need to know anything about American Football to understand what I'm trying to do:

    Controls

    1. Press 'o' to activate movement of the blue dot

    2. Use the arrow keys to move the blue dot

    3. When you press 'o' that kills the :40 clock

    4. When the blue dot collides with the red dot, the blue dot counts up to '5'. When it hits '5' that signals a "tackle" is finished, and that should immediately reset the :40 clock to :40.

    Now here is where the problems start...

    -The :40 clock hangs for a second or two instead of starting immediately at :40

    -The clock shows the '0' first before showing :40

    -If you allow the gameclock to run all the down to zero, sometimes it will glitch and show text overlap of numbers that should've disappeared.

    -There are some slight issues with accuracy. When the :40 clock (on the right) goes below :10 and you press 'o' to activate the blue dot's movement, the first zero doesn't go invisible. I have code in place for it in line 32, but for some reason it's not triggering.

    -If I press 'o' after the playclock is below :10 AND I then have the blue dot collide with the red dot, a strange glitch occurs where the :0 stays visible while the clock is running down. I'm sure it's something in the code causing it, but for some reason I can't find it.

    File: Unavailable due to upload expiration.

  • Hi MrMiller, are controls 1 to 4 all that needs to happen? I still can't quite figure out what's going on with this too clearly, but I should be able to make those 4 rules work for you in a blank cap.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi Jayjay,

    Yes. The only other thing is, if you press the 'enter' key you call a "timeout": that takes 1 red square away, resets the :40 clock to :40 seconds and begins counting down from :40 again, and stops the 15:00 clock.

    When you press 'o' after that, this should again activate the movement of the blue dot, make the 15:00 clock begin counting down again from the last point where it stopped, and it should make the :40 clock disappear until the next "tackle" is made... and then the cycle repeats itself.

  • The event code in the .cap I made is a real beast. I've actually gone through maybe 5 different sheets. They work but they're always off in some miniscule way.

  • Phew, finally had time to look at this.

    Is this what you were thinking? GameClockRedo.cap

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