
-----------------------------------
windowsall
Sat Apr 02, 2005 9:34 pm

Help with setting up boundaries
-----------------------------------
Hi, Im new here, and im wondering why my bounderies ar not working? in this prog?
setscreen ("graphics:600;400,position:center;center,nobuttonbar")
var x, y, a, b, c, d : int
var chars : array char of boolean
% Randomly Generates Starting points of you and enemy
randint (x, 0, 600)
randint (y, 0, 400)

randint (a, 0, 550)
randint (b, 0, 350)
c := a + 20
d := b + 20

% Draws the Attacking weapons
proc attack
    for i : 2 .. 50
        drawdot (x + i, y, black)
        delay (10)
        drawdot (x + i, y, white)
    end for
end attack

% Draws The enemy
proc enemy

    drawfillbox (a, b, c, d, blue)

end enemy

% Declares that you have been hit
proc hit
    if x >= a and y >= b and x = a and y >= b and x = a and y >= b and x 