boost
BlitzPlus Forums/BlitzPlus Programming/boost
| ||
I what to make a game were you can move arrow any where on the screen. I can do all that really easy but the main thing I what to do is when you hit a button say shift your speed doubles then when you let go your speed goes back to normal. I have tryed meny diffrent way but can not get it to work right. |
| ||
Hi Pyro check this out: Graphics 640, 480 Repeat xs = MouseXSpeed() ys = MouseYSpeed() MoveMouse 320, 240 MouseXSpeed() MouseYSpeed() If(MouseDown(1)) xs = xs * 2 ys = ys * 2 End If x = x + xs y = y + ys Text x, y, "*" Flip Cls Until KeyHit(1) regards Mr Brine |
| ||
Thank you it will help me alot. |
| ||
Hmmm looks OK but: borrowing on your code: [code] ;borrowing Mr Brines code Graphics 640, 480 speedflag = 1 Repeat xs = MouseXSpeed() ys = MouseYSpeed() MoveMouse 320, 240 MouseXSpeed() MouseYSpeed() If KeyHit(50)>=1 Then speedflag = 1 - speedflag if speedflag = 0 then xs = xs * 2 ys = ys * 2 End If x = x + xs y = y + ys Text x, y, "X" ; you know you can put a sprite or image here Flip Cls Until KeyHit(1) |