
-----------------------------------
chipanpriest
Tue Dec 06, 2011 9:50 pm

Variables in Font.Draw
-----------------------------------
Hey guys, it's me again, Aaron. I was just making another program which is like a hide-and-seek type of game. I want to be able to display the final score at the end in a bigger font than the Turing default when I do "put score". Can anyone help meh? :D



var mousex, mousey, click, boxx, boxy, col, score, timevar, font : int

View.Set ("graphics:1000;600,offscreenonly")
font := Font.New ("Comic Sans MS:30")

timevar := 0
score := 0
loop
    randint (col, 1, 15)
    randint (boxx, 20, maxx - 20)
    randint (boxy, 20, maxy - 120)

    loop
        cls
        mousewhere (mousex, mousey, click)
        drawfilloval (mousex, mousey, 50, 50, 0)
        drawfillbox (boxx - 10, boxy - 10, boxx + 10, boxy + 10, col)
        drawfillbox (0, 500, maxx, maxy, 0)
        drawline (0, 500, maxx, 500, 7)
        colourback (0)
        put "score: ", score
        locate (1, 50)
        put timevar
        colourback (col)
        View.Update
        if timevar = 5000 then
            exit
        end if
        timevar := timevar + 1
        if mousex >= boxx - 10 and mousex = boxy - 10 and mousey 