Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Help with click-n-shoot program.
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
wk1989




PostPosted: Thu Jun 02, 2005 9:18 pm   Post subject: 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
code:

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?
Sponsor
Sponsor
Sponsor
sponsor
Delos




PostPosted: Fri Jun 03, 2005 7:20 am   Post subject: (No subject)

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:

Turing:

score := score + 1
% is the same as
score += 1
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: