Game Maker's Garage Forum
Game Creation => GameMaker => Topic started by: Zoo on May 24, 2011, 07:33:53 PM
-
Is there a maximum to how long a timer can be? I want to make a 7.5 million year long timer, for the fun of it.
-
I don't know, why don't ya code one and tell us when it ticks?
-
Is there a maximum to how long a timer can be?
I don't know, but my guess would be 32767. Since 100 = 1 second, that would be 327.67 seconds or 5.4 minutes.
-
Well I just tried 33000 and it worked, so maybe I'll try 360000 and come back in an hour and see what happens.
-
OK. With 360000 it still only waits a little more than 5 minutes, so while there's no error, it looks like the most seconds a timer can be is 32767 even if you use a higher number.
-
What happens if you nest an ON KEYDOWN structure within a TIMER event incorporating a negative trigger value? Now this I gotta see...
-
Inverted blackhole... :o
-
Turns out there's a maximum for a variable too, so my other idea didn't work either...
-
Keep your number as a string. Strings can be up to 255 characters. That's a long number...
"1254689756321159876453159845623789512365942158963215789563215125468975632115987645315984562378951236594215896321578956321512546897563211598764531598456237895123659421589632157895632151254689756321159876453159845623789512365942158963215789563215845623197658431"
-
Keep your number as a string. Strings can be up to 255 characters. That's a long number...
"1254689756321159876453159845623789512365942158963215789563215125468975632115987645315984562378951236594215896321578956321512546897563211598764531598456237895123659421589632157895632151254689756321159876453159845623789512365942158963215789563215845623197658431"
Fail.
-
But if you do a string$ = string$ - 1 wont it take away the character of one?
-
You'd have to do some advanced string manipulation to get it to calculate right.
Fail? Seemed more like a clever win to me. ;)