question:how to draw an image at the mouse coords?
Blitz3D Forums/Blitz3D Beginners Area/question:how to draw an image at the mouse coords?
| ||
Okay, I need help...I don't know how to draw an image at the mouse's coords...How do I do it?And one more thing... this is for a game, I need to test if the mouse image and button collide, I think you do it like this: If ImagesOverlap(mouseimage,mousex,mousey,button,320,30) if mousehit(1) ;do something endif endif but, of course, that doesnt work because the image doesnt move with the mouse! I do the image drawing like this: [code] drawimage mouseimage,mousex,mousey |
| ||
If ImagesOverlap(mouseimage,mousex(),mousey(),button,320,30 you need the parenthesis or MouseX and MouseY will return 0. Like this Print MouseX() Print MouseY() |
| ||
thanks killerx, it works. weird how it needs () |
| ||
It's because it's a function and returns data, the data being the mouse co-ord on the x or y axis. |
| ||
To get any command/function to return a value in any version of Blitz you always need brackets (). |
| ||
OK.Thanks. |