• Hey! Guest! The 40th (!!!) GMC Jam will take place between February 25th, 12:00 UTC to March 1st 12:00 UTC. Why not join in this very special anniversary jam! Click here to find out more!

movement

  1. M

    GMS 2.3+ Coding A Proper Hookshot?

    Hello there! I am currently working on a side scrolling platform game with a main focus being hookshot based grappling which the player will use to both traverse and fight/grab enemies using a button press based on the direction the player is facing similar to say 2D Zelda. Currently, I am able...
  2. B

    GMS 2.3+ Collision Issue, but only when moving Left and Up

    I found a script for collisions that works when colliding with the ground, or walls to the right. I am trying to figure out how it ticks, but there is a problem I can't fix. It gets the player stuck in ceilings and walls to the left. I am pretty confident the issue is here: if...
  3. Necromedes

    Says x Is Undefined???

    I've just recently switched over to GM2 and am using one of Shaun's videos as a reference to re-learn the new GML changes. I am trying to create simple left and right movements and in the video, he uses... x = x + hsp; I am using different variable names but did it exactly the same and I am...
  4. Kezarus

    GMS 2.3+ Turn-Based Movement Algorithm

    Hello everyone! Just posting my turn-based movement code for the ones that might need it. First of, there are other codes besides just the movement, like enums and constants, but I think you can figure it out. [/SPOILER] Feel free to ask me anything. I hope this helps. =]
  5. Robotnik91

    Game Maker 1.4 8-Directional Movement

    Hiya! I'm a beginner when it comes to coding. I don't know how to write my own 8-directional movement code for an RPG-type game. Also, I've been trying to search for YouTube videos describing how to code correctly. However, I cannot find any videos for Game Maker 1.4... only for Game Maker 2. I...
  6. K12gamer

    8 way movement + Shooting (GameMaker Studio)

    I've made a game with 4 way movement / 4 way shooting. I'm experimenting (unsuccessfully) on the the best way to include 8 way movement + shooting. I included an open source file of my experiment. I wanted to know if someone could fix the 8 way player then relink the file. Once complete...I'd...
  7. H

    GMS 2 Array code is not working

    I'm trying to make this code move my player along a path that I make when I click my mouse down. So if I click the mouse and draw a circle, the player will move in that circle. But I can't even get it to run and I don't know if this will work. Any advice would be greatly appreciated.
  8. S

    GMS 2.3+ Collisions when moving in mouse direction

    Hello guys! Any tips on how I can make collisions work with the following movement code? I'm moving the player with w,a,s,d, all relative to the mouse position. So if I press "W", the player moves towards the mouse pointer, and away if I press "S". "A" and "D" will make the player strafe...
  9. marasovec

    [solved] Making this without using sin()

    Hi I'm trying to achieve this gravity like type of movement I'd like to know of it's possible to do this without the sin function
  10. Y

    SOLVED Help with grid-based movement

    I'll try and keep this is as simple as possible. I'm making a top-down box pushing/pulling game where once the player makes contact with the box, they are "magnetized" to it unless they scrape it off. The movement in the game is tile-based, so one press of the movement key moves the player...
  11. C

    SOLVED Simple collision with vehicle controls?

    Hey all, I'm currently creating my first-ever game with GameMaker (v2.3.0.529), and have encountered a pretty tough problem (for me, at least). The game I'm making is going to be fairly simple - the player will take control of a car and try to hit moving targets. I've just arrived at the point...
  12. UberhenriK

    GMS 2.3+ Movement direction variable?

    Hello there, I'm creating a topdown game, and i want create some kind of variable that stores moving direction of character depends of it X speed and Y speed. I want use this var to rotate the characters sprites, collision and for other useful things. Unfortunately i have no idea how to do...
  13. DrNegative15

    GMS 2 Issues with 'Movement and Collision with Multiple Moving Objects'

    Issue 1: Order of instance code execution affects movement behavior. Visual Aid for Issue 1: Scenario: 4 block instances are lined up one directly behind another and all are going to move together in the same direction. First they will all be moving to the right. (left side of...
  14. B

    Move towards point in specified units

    Hi, I have been trying to find the answer to this and have been unsuccessful, hoping someone can help me solve this! I have an object and I want it to move towards the direction that my user taps on the mobile device. I want it to move for only a specific amount of distance, say for example 10...
  15. 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...
  16. 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...
  17. 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...
  18. E

    Using Sin with move_towards_point.

    I'm currently learning to use Sin from an old post from Gre_Lor12: https://forum.yoyogames.com/index.php?threads/vertical-sine-wave.8185/. 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 +...
  19. 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...
Top