Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / shooting from sprite to mouse pointer

Author
Message
Jungle burger
20
Years of Service
User Offline
Joined: 2nd Apr 2005
Location:
Posted: 2nd Apr 2005 21:28
Can anyone help me with this please? I'm creating a 2d scrolling platform shooter. Where the character can shoot in any direction dependant on the position of the mouse. How do I get the bullet to move to the mouse from the characters centre, I presume that I should use the ATANFULL command to get the angle and work out the direction from that, but i'm stumped as where to start. has anyone got any ideas, thanks in advance
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 3rd Apr 2005 08:43
This should get you started. Move player around with cursors and left mouse button to fire bullet at mouse pointer. You can shoot again when bullet goes off screen.



Boo!

Login to post a reply

Server time is: 2025-05-18 18:28:50
Your offset time is: 2025-05-18 18:28:50