
-----------------------------------
venue92
Tue Mar 31, 2009 1:34 pm

hit a key to remove picture
-----------------------------------
Ok so i have objects (circles) falling down the screen, and i need it so that when i hit a specific key referring to a specific one of the circles, the circle disappears. i have no idea how to do this and any help will be greatly appreciated.



setscreen ("graphics")

var q : int % difficulty variable
q:=0
procedure a
    %first circle

    var c : int

    c := Rand.Int (1, 6)

    for y : 10 .. 400
        drawfilloval (20 + (c * maxx div 7), 400 - y, 20, 20, brightblue)
        delay (q)
        drawfilloval (20 + (c * maxx div 7), 400 - y, 20, 20, white)
    end for
end a
procedure b
    %second circle

    var d : int

    d := Rand.Int (1, 6)

    for y : 10 .. 400
        drawfilloval (20 + (d * maxx div 7), 400 - y, 20, 20, black)
        delay (q)
        drawfilloval (20 + (d * maxx div 7), 400 - y, 20, 20, white)
    end for
end b

%third circle
procedure c
    var f : int

    f := Rand.Int (1, 6)

    for y : 10 .. 400
        drawfilloval (20 + (f * maxx div 7), 400 - y, 20, 20, purple)
        delay (q)
        drawfilloval (20 + (f * maxx div 7), 400 - y, 20, 20, white)
    end for
end c
%difficulty selection

procedure gui
    locatexy (110, 325)
    put "Easy"
    locatexy (110, 200)
    put "Medium"
    locatexy (110, 75)
    put "Hard"
    drawbox (50, 275, 175, 375, red)
    drawbox (50, 150, 175, 250, red)
    drawbox (50, 25, 175, 125, red)
end gui

var x, y, button : int
gui
loop
    mousewhere (x, y, button)
    if button = 1 and 50 