Mouse rotation

Game Editor comments and discussion.

Mouse rotation

Postby sniperpike » Thu Aug 09, 2007 1:42 pm

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
sniperpike
 
Posts: 18
Joined: Thu Aug 09, 2007 11:57 am
Score: 1 Give a positive score

Postby sniperpike » Thu Aug 09, 2007 2:13 pm

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 ?
sniperpike
 
Posts: 18
Joined: Thu Aug 09, 2007 11:57 am
Score: 1 Give a positive score

Postby d-soldier » Thu Aug 09, 2007 3:18 pm

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".
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby sniperpike » Fri Aug 10, 2007 9:29 am

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?
sniperpike
 
Posts: 18
Joined: Thu Aug 09, 2007 11:57 am
Score: 1 Give a positive score

Postby d-soldier » Fri Aug 10, 2007 3:10 pm

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...
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron