1. A

    SOLVED Player object moves to the right without any inputs

    I'm having a strange thing going on with my code. This is the code I usually rely on to move my player object. However, it now moves to the right on it's own when no key is being input. If I press the key to go left, up, or down, the object stops moving to the right. You can test it to see the...
  2. E

    GMS 2 GMS2 acceleration_to_point

    Alright, here's something I thought could be extremely useful IF I could ever figure out how to make it. A piece of code where an object moves from one point to another smoothly without just jumping to the co-ordinates. This is the base I'm working with. Any ideas on how to continue this? (I'm...
  3. ShadowLenz

    4 directional movement question and how to make his collisions

    I'm making an old RPG style (like the first Final fantasy) is "motion_set" the best way to make a 4 directional move? i dont want to make a eight directional movement, just up, right, left, down with not diagonal direction. and the collisions are well scripted? the character's movement is...
  4. E

    Using Sin with move_towards_point.

    I'm currently learning to use Sin from an old post from Gre_Lor12: This is the code: var Amp = 20; //How "Stretched" the wave is var Freq = 10 //How much to increase the waves amplitude by (in px) x = xstart +...
  5. J

    (Solved)Rotate Player movement with camera view rotation

    So atm i can rotate the camera and the player matches the camera angle, im trying to add/subtract the angle of the camera view to the movement code of the player. if i rotate the camera 180* and move the player up, it will actually be moving down, because its not taking into account the...
  6. mikke

    GMS 2 Can't get my player sprite to move horizontally

    So I'm SUPER new to GMS2, and all game programming really, so I'm probably making a rookie mistake. I'm following Shaun Spalding's complete platformer tutorial and have copied the code character for character to add movement to the player object, albeit with adjustments for the numbers in his...
  7. P

    GMS 2 Unbiased 4-Directional Movement With Diagonal Movement

    Hi there So I want to have 4-directional movement but still allow for diagonal movement. It's just basically the movement Undertale has but I just don't know how to make it work properly. what I have now is: /// Create Event plyrspeed = 2; // I need to work with directions like this because I...
  8. Hypotakt

    SOLVED Neat collision handling with using sprite masks (in GM:S 1.4)

    Hey guys, I am obviously searching for a smooth collision handling system for my game. I spent a lot of time today, finding a good way to implement, but had no success yet. The game character is moving per direction and speed, but it has only 4 different directions in sprite (left, right, up...
  9. M

    how do i make my character movement more smoother?

    how do i make my character movement more smoother? like car speed from slow to fast. could you please write the coding, i really need some help
  10. M

    GMS 2 Character movement thing

    So my character that im playing as is weird. When i first hit "d" (right) he teleports a meter away before starting to walk. Same as when i press "a" (left). It annoys me because it makes the game kind of ****. How can i fix this?
  11. FoufaDjo

    SOLVED collision,friction and accel problems

    i followed a tuto on yt about movement and the dont use the speed var so i cant use the friction function can someone help me: hspd = (rkey-lkey); vspd = (dkey-ukey); if (hspd != 0 or vspd != 0){ dir = point_direction(0,0,hspd,vspd); hmove = lengthdir_x(spd,dir)...
  12. Mike?

    Issue with dash mechanic for movement

    Hello! This is my first time posting here and I'm in the middle of building my movement in Game Maker studio 2. I have horizontal movement down, however I can't seem to get the dashing ability work properly. In the create event, pretty straight forward stuff: move_speed = 300; key_left =...

    How do I make my platformer game, act like a platformer game?

    In traditional platformer games you would have a rectangular room where the player can move left or right. And depending on which direction you move in, more of the level will be revealed to you, as you go. How do I do that in gamemaker? As of right now, I just have a square room for a level...
  14. kureoni

    help with colision code?

    thats the basic movement code for the obj_enemies if(instance_exists(obj_player)){ mp_potential_step(obj_player.x, obj_player.y, spd, obj_colision) image_angle = point_direction(x, y, obj_player.x, obj_player.y); what i want to do is: when the obj_enemies touch a obj_colision (that...
  15. kureoni

    SOLVED does anyone knows how to make a functional topdown 2d movement script?????

    var move_left = keyboard_check(ord( "A")); var move_right = keyboard_check(ord("D")); var move_down = keyboard_check(ord("S")); var move_up = keyboard_check(ord("W")); if (move_left && place_free(x-spd,y)){ x-=spd; } if (move_right && place_free(x+spd,y)){ x+=spd; } if...
  16. S

    GMS 2 Having some trouble with moving platforms

    So for the past few days I have been trying to get moving platforms to work in GameMaker Studio 2. Started by following Shaun Spalding's tutorial (1 way platforms and moving platforms). I also have some acceleration and deceleration of my character that might be causing my issue. Was hoping to...
  17. V

    Windows run sprite animation is not working.

    i am just new to gamemaker studio 2 and programming itself. and still learning the basics, but now i ran in another issue i can't figure out. i am a little bit struggling with my code for moving with my sprites. but everything seems to work fine now, but the only issue i still got is that my...
  18. F

    How do i achieve "slippery movement" / difference between two directions

    So i want to create an enemy AI that charges tword a player but has like a simulated friction/delay. kinda like as if it were running on ice, so it starts still and builds up speed in your direction to try and ram you. But if you dodge him he shouldnt continue moving tword you but in the...
  19. A

    Legacy GM [GMS 1.4] Movement code that worked for one project won't work for this one

    -I get no errors, it just simply refuses to move -double checked if its the exact code i had for the previous project -left out animations -other inputs I made work such as using the arrows to launch projectiles
  20. F

    Problems with the enemies movements

    Please help me, I have a trouble with the moves of the enemies in my game!! They are facing right, but when they walk to left, they don't turn to the left and make a "moonwalk". Also, I can't make they change to stopped sprite when they are stopped and they keep with the walking animation even...