PDA

View Full Version : Countdown


ThomasAnderson
10-26-2008, 06:52 AM
Hello,
I was wondering if it's possible to make a countdown, for 108 minutes for ex. and in last 4 minutes if u don't type a code(4 8 15 16 23 42) it will happen something(ex. a dialog will show or w/e)

PS: If someone saw Lost (TV Serie) than u will understand it easier

Teqskater
10-26-2008, 07:34 AM
Use page.StartTimer(1000) to start a timer that fires every second.

Then create a time variable for example:
countdowntime = 6480 --6480 seconds = 180 minutes

Then on the On_Timer event you subtract 1 from the variable countdowntime if its more then 240 (4 minutes). when the countdown reaches 240 (4 minutes) show a Dialog and stop the timer or something else
if countdowntime > 240 then
countdowntime = countdowntime - 1
elseif countdowntime == 240 then
Page.StopTimer()
Dialog.Message("BZZZZZZ TIME'S UP", "Mission failed.\r\n\r\nMUHAHAHAHAHHAHAHAHAHHAHAHAHAHA!!!!! !!!!!!!!!!", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
end

The code part you need to find out yourself. this is just a basic countdown.

RizlaUK
10-26-2008, 09:02 AM
lol, i love lost