
-----------------------------------
Ziozio123
Thu Jan 08, 2009 11:21 am

I need some help with timers
-----------------------------------
My game is about half done right now, Basically its a timed quiz that you race against predetermined times to score 1st place - In otherwords you need to answer the questions correctly and try your best to get the best speed. Now I understand that there are only 2 questions being displayed on images right now but that really isnt the issue. I need to figure out a way to have a timer running in the background of the game, that lets the game go as it would normally but ends right when you answer the last question - then that time would be recorded and posted on a leaderboard ;]  




setscreen ("graphics:640:480")
var font : int
var x: int := 1
var name2 : string
var total : real := 0
var input, input2, input3, input4, input5, input6, input7, input8, input9, input10 : int


proc music
    Music.PlayFile ("Prodigy_-_10_-_You_Will_Be_Under_My_Wheels.MP3")
end music

proc game
    drawfill (0, 0, 255, 20)
    Pic.ScreenLoad ("Question2.JPG", 50, 2, picCopy)
    get input
    if input = 2 then
        cls
        Pic.ScreenLoad ("Question1.JPG", 50, 50, picCopy)
    else
        Pic.ScreenLoad ("crash1.JPG", 1, -40, picCopy)
        delay (5000)
        cls
        Pic.ScreenLoad ("Question1.JPG", 50, 2, picCopy)
    end if
    get input2
    if input2 = 4 then
        cls
        Pic.ScreenLoad ("Question3.JPG", 50, 2, picCopy)
    else
        Pic.ScreenLoad ("crash1.JPG", 1, -40, picCopy)
        delay (5000)
        cls
        Pic.ScreenLoad ("Question3.JPG", 50, 2, picCopy)
    end if



end game

proc help2
    drawfill (0, 0, 255, 20)
    Pic.ScreenLoad ("help#2.JPG", 50, 0, picCopy)
    loop
        var x, y, button : int
        Mouse.Where (x, y, button)
        if x >= 500 and x = 0 and y = 550 and x = 0 and y = 200 and x = 10 and y = 300 and x = 10 and y = 10 and x = 330 and y 