Game Maker 7 how to make a character shoot towards your mouse

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
24,311
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jan 17, 2009

EDIT: Yeah! over 1,000 views April 3, 2009
EDIT: Thanks guys! Over 8,200 views! December 20, 2009

Put "&fmt=18" at the end of the address bar to watch in HQ

A tutorial on making your character shoot towards the mouse area.

Code: Copy form here to the places shown in the video.

image_index = direction-90
direction = point_direction(x,y,mouse_x,mouse_y)
speed= 0
if keyboard_check(vk_up)speed=3
(this part goes under "step"

(the next part goes under "mouse")

b=instance_create(x,y,bullet)
b.direction=direction
speed= 15


If you need additional help just contact me through PM and gimme your e-mail so I can e-mail you a full tutorial with pictures and example and codes.

Category:

Howto & Style

Tags:

License:

Standard YouTube License

Link to this comment:

Share to:

Uploader Comments (haydenap)

  • Okay guys if your reading this I don't know why people are still going to this video instead of my new one. My new vid is MUCH better and is complete and detailed and as far as I know correct. The link to it is the box at the beggining of this video...

Top Comments

  • HOLY!!!!Thats one of the best tutorials i have ever seen WOOT!

  • @intaler I got it now

see all

All Comments (159)

Sign In or Sign Up now to post a comment!
  • Thanks

  • It all worked out good. Exept my charecter did not follow the mouse.

  • i cant read the part where you put that move towards in the create event for the bullet

  • OK, I got the lite edition, and this is what I need, but I want the character to be from a side view, not top-down. Have a tutorial for that?

  • how can i make the movement wasd instead of arrow key up toward the mouse?

  • hey help i dont see bullet only blue screen tryed :(

  • Very Nice

  • @kingsong2010 maybe is your bullet object not called bullet and you must fill in the name of your bullet object

  • @billyakaeaster you werent supposed to copy the: this part goes under "step"

    

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more