Mouse speed

Blitz3D Forums/Blitz3D Programming/Mouse speed

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

>So, what should i do?

Well, you should obviously think about what you need to accomplish, then trawl through the 2D commandset and check the mouse related commands, then draw the logic on a piece of paper and then program it.

Failing that, you can use this. PageUP and PageDOWN changes the scale# variable and thus the speed of movement.

EDIT: I am worried though - This is really simple stuff and you don't even seem to be trying.

Graphics 640,480 

SetBuffer BackBuffer() 
scale#=1.0

Repeat 

xs=MouseXSpeed()*scale#
ys=MouseYSpeed()*scale#
MoveMouse 320,240  
x=x+xs  
y=y+ys 

If KeyHit(201) Then scale#=scale#-0.1 
If KeyHit(209) Then scale#=scale#+0.1 

Cls 
Text x,y,"X",True,True 
Text 10,10,"Scale: "+scale#
Flip 

Until KeyHit(1) 

End



Andy