I can't tell time

For questions about using Classic.

Post » Mon Jun 25, 2012 4:08 am

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.MrMiller2012-07-12 14:44:46
B
12
S
4
G
3
Posts: 426
Reputation: 2,458

Post » Mon Jun 25, 2012 11:36 pm

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.
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Tue Jun 26, 2012 4:44 am

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.
B
12
S
4
G
3
Posts: 426
Reputation: 2,458

Post » Tue Jun 26, 2012 2:54 pm

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.
B
12
S
4
G
3
Posts: 426
Reputation: 2,458

Post » Thu Jul 26, 2012 1:17 pm

Phew, finally had time to look at this.

Is this what you were thinking? GameClockRedo.capJayjay2012-07-26 23:26:08
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests