
-----------------------------------
skatelhs
Fri May 30, 2003 1:13 pm

Mouse-Click reaction parameters
-----------------------------------
Hey, I want to make it so when i click on a certain area, not just on an x or y value, something happens. so far ivegot somethin along the lines of

var x, y, button, targeta, targetb:int
loop
mousewhere (x, y, button) %gettin mouse location
drawfilloval (x, y, 2, 2, red) %drawing crude crosshair (ive got a better one just not here)
randint (targetx, 1, 100)
randint (targety, 1, 100)
(insert picture command- target.bmp at (x, y)  )
if button=1 and
x=   (i need somethin like a range here,  targetx + or - 10) and
y=  (same thing, i need a range, targety + or - 10) then
put "You hit the target"
end if

kinda confusing for me.  If you can let me know how to do a range sort of thing that would be great.
adam

-----------------------------------
Andy
Fri May 30, 2003 2:28 pm


-----------------------------------
just have this
 
if x< something and x> something+range and y< something and y>something+range then
end if


-----------------------------------
skatelhs
Sun Jun 01, 2003 1:36 pm


-----------------------------------
yeah, i have that, and its on with randints in the x and y places, but its not working at all
