anything wrong?

Blitz3D Forums/Blitz3D Programming/anything wrong?

Oiduts Studios(Posted 2008) [#1]
is there anything wrong with this??

If MouseDown(1)
Createball()
Else
Text 400,300,"press mouse"
End If


Vertigo(Posted 2008) [#2]
Well no... but there should most likely be two conditions there...

A. You need to put that in a loop of some sorts.

B. The function CreateBall() exists somewhere in your program.

?


big10p(Posted 2008) [#3]
And you'll probably want to use MouseHit() instead, unless you really want balls to be constantly created while the mouse button is held down.


Vertigo(Posted 2008) [#4]
Or do you not have a function of types to create balls? Were you really wanting to create a Sphere?

CreateSphere()?

In which case I would certainly use MouseHit() like big10p stated.


H. T. U.(Posted 2008) [#5]
This will only work in a loop. When a Blitz program is started, it usually assumes that all mouse or joystick inputs are at their zero point (it sometimes seems to do this with your keyboard too). If that's the case, you must press the mouse button down after the program has started.