Page 1 of 1

Mouse rotation

PostPosted: Thu Aug 09, 2007 1:42 pm
by sniperpike
Hope anyone can see through this :

I want my sprite (wich is in the middle of the screen),
to rotate according to where my mouse pointer is on the screen (A turret that follows the crosshair)

I should be possible, just cant figure out how to do so !!! :roll:


Sniperpike

PostPosted: Thu Aug 09, 2007 2:13 pm
by sniperpike
I've found this on the forum, it worked.

http://game-editor.com/forum/viewtopic. ... se+pointer

Except my bullets starts from lower right corner, and not in the middle of the screen !!! ??????
Anyone ?

PostPosted: Thu Aug 09, 2007 3:18 pm
by d-soldier
Your turret's KEYDOWN/MOUSEDOWN event needs to be adjusted... Check the script you setup for it when it shoots, anytime you have an actor create another actor, there are some additional settings available,such as x/y coordinates. Check that the coordinates both say 0, and the the "relative to creator" box say "yes".

PostPosted: Fri Aug 10, 2007 9:29 am
by sniperpike
I works fine now, when i use the space bar assigned as fire-button (Key Down). But when I assign the mouse button instead (mouse button down), it wont shoot?

PostPosted: Fri Aug 10, 2007 3:10 pm
by d-soldier
thats because your basically setting up the mouse-click to shoot (if you click on the turret) when you setup that event on the turret's mousedown event...