
-----------------------------------
wk1989
Thu Jun 02, 2005 9:18 pm

Help with click-n-shoot program.
-----------------------------------
I'm making this program where there are balloons rising up, and the user would then click to shoot the balloon and score. But the problem is, turing counts in milliseconds and gives the user 20~50 times what he's supposed to get.
this is pretty much how i did it

if whatdotcolour (mouseX,mouseY) not = 0 and mouseButton not = 0
then score := score +1
end if


Any ideas on how to make this a proper balloon shooting game?

-----------------------------------
Delos
Fri Jun 03, 2005 7:20 am


-----------------------------------
Try one of two things:

Instead of using Mouse.Where() to figure out if the button has been pressed, use Mouse.ButtonWait().
Or
Put a short delay (about a count of 10) after your Mouse.Where() call to compensate.
The former is recommended.

Also:


score := score + 1 
% is the same as
score += 1

