Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Another easy one... Timer problem?
#3
(03-19-2025, 06:05 AM)DSMan195276 Wrote: The issue is that `score` isn't cumulative, instead it's set equal to `Pick * 10 - TimePenalty` on each loop. `TimePenalty` is only the penalty for the current loop, it doesn't include any penalties for previous loops - even though there was a 1 point penalty on the previous loop to get 39 that penalty is lost when you do the next loop and `TimePenalty` is set to 0 (because you're within the 5 second window).

A simple solution is to do `TimePenalty = TimePenalty + Int((T2 - T1) / 5)`, that way `TimePenalty` will include any penalties from previous loops.

Alternatively you could stop using `Pick` and do `Score = Score + 10 - TimePenalty`, so that way score retains the penalties.

Of course, don't do both of the options or you'll double-count the penalties Big Grin

Ahh, thanks DSMan.
Another silly oversight on my part! Now I can continue with my new game.  Smile
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, Western Australia.) Big Grin
Please visit my Website at: http://oldendayskids.blogspot.com/
Reply


Messages In This Thread
RE: Another easy one... Timer problem? - by PhilOfPerth - 03-19-2025, 08:48 AM
RE: Another easy one... Timer problem? - by bplus - 03-19-2025, 10:53 AM
RE: Another easy one... Timer problem? - by bplus - 03-19-2025, 11:24 PM
RE: Another easy one... Timer problem? - by Pete - 03-20-2025, 01:16 AM
RE: Another easy one... Timer problem? - by Pete - 03-21-2025, 06:23 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  I'm looking for suggestions to solve the problem! Petr 10 676 02-05-2026, 04:56 PM
Last Post: ahenry3068
  Nth problem with hardware images Ikerkaz 9 486 01-23-2026, 02:58 PM
Last Post: bplus
  Install problem...... jssantoro 6 392 12-17-2025, 08:31 PM
Last Post: madscijr
  maths problem with percentage pmackay 3 538 09-04-2025, 09:57 AM
Last Post: pmackay
  Problem with font in Teletext browser. SquirrelMonkey 7 756 08-27-2025, 11:38 AM
Last Post: BDS107

Forum Jump:


Users browsing this thread: 1 Guest(s)