GameMaker Tutorial – Move Player in Facing Direction



Get Element Earth ▶
Support This Channel ▶

Follow me on Facebook ▶
Follow me on Instagram ▶
Follow me on Twitter ▶
Follow me on Google+ ▶

This time I’ll show you how to make your object move in the direction it is facing.

▼ Useful Links and Resources ▼
GM 8 Project ▶
GM Studio Project ▶

▼ More ▼
General Game Maker Playlist ▶
Game Maker Networking ▶

Happy Coding 😀

Nguồn: https://vestingpoint.com/

Xem thêm bài viết khác: https://vestingpoint.com/game/

14 thoughts on “GameMaker Tutorial – Move Player in Facing Direction”

  1. thank a load. i was trying forever to get a object just to move in its facing direction, though insted of mouse i have used the keyboard to change its facing direction. but oddly enough im unable to use a and d but i have to use left and right. any idea how i can solve this?

    Reply
  2. wait how do I make the player:
    -move with arrow keys
    -move horizontally when 2 keys are pressed
    -change sprite after moving (example change sprite to player looking left after moving left)

    Reply
  3. what if i want the angle to be controlled by the keyboard? like if i wanted to control the guy by : (keyboard_check(vk_up)) speed+=1; and that left and right would be :image_angle+or-=1. so you would turn the guy with the arrow keys and he would move in that direction

    Reply
  4. I need Help!
    I want to make a Top-Down-Shooter with a Tank and a Tank can't move left or right without turning. I Have the turning and it does work but I want the Tank to move into the Direction it is looking (using "W"). I can't use the mouse because I steer the cannon with it. Could you help me?

    PS: It might be a bit confusing and bad English because I'm a German. 😉

    Reply
  5. help?? ;(

    _________________________________________
    FATAL ERROR in
    action number 1
    of Step Event
    for object car obj:

    COMPILATION ERROR in code action
    Error in code at line 3:
    if (keybaord_check(ord("A")))
    ^
    at position 6: Unknown function or script: keybaord_check

    Reply
  6. Can you help me??? I'm making a game and if you press the right arrow it turns 45 degrees right, and the up arrow moves it forward. But I want it to move the direction the OBJECT is facing… Please help!!!

    Reply
  7. I know this is an old video, but I was wondering, how come your sprite doesn't go all blurry after it began rotating out of its default image_angle? My sprite is all blurry unless the image_angle is equal to a value multiplied by 90..

    Reply
  8. I'm making a top down shooter and am having a problem with this. I am trying to get my enemy (zombie character) to face the player but I don't know how. If you can help please tell me how to fix this in the comments.

    Reply
  9. How do I make my check the direction it's facing then use A and D to move left and right? (I go forward with W)

    Reply
  10. How could I make an enemy do this? The enemy is AI and it uses the step movement to walk towards player.x and player.y

    Reply

Leave a Comment