movement

  1. T

    GMS 2.3+ Need Advice for Movement Code

    So the past couple months I've been spending what time and patience I could muster trying to figure out how I should handle my movement, specifically in regards to real numbers, angles and collisions. Ideally I would like to program a collision system that would enable me to have real value or...
  2. DTheChemist

    Sprite distortion issue need help

    Ok heres my first error code issue after following a Yoyo games youtube video tutorial. /// @desc Core Player Logic //Get Player Inputs key_left= keyboard_check(vk_left); key_right = keyboard_check(vk_right); //key_down = keyboard_check(vk_down); key_jump = keyboard_check_pressed(vk_space)...
  3. yukaccino

    GMS 2.3+ Hex-Grid Movement- Issues with Script

    Hello! I'm a newbie with GameMaker and my programming skills are really basic, so I've been following a four years old tutorial series I found- I want to make a Turn Based Strategy game, using a hex-grid to move and attack, pretty similar to Sid Meyer's Civilization. Tutorial I've found: I got...
  4. S

    Drag And Drop Character overlaps object after each movement

    Hey all, I have been working on a 2D platform game, however, I have difficulty getting my character to remain on any object after each movement (pressed) even with collision on the object. For example: 1. My character would overlaps on the object's corner (not using the tiles yet) after...
  5. S

    Help with programming

    Hello everyone! I'm kinda new to programming and was following this tutorial: when I ran into a problem. when I try and run the program I get this error message: ___________________________________________...
  6. L

    SOLVED Check direction face character before move.

    Hi, I am quite new to GM, I would like someone to help me, you see, I have managed to make my character move in a 16x16 grid, which changes the sprites according to the direction in which I move. But in addition to that I would like to implement the following validation: -When my character is...
  7. L

    Legacy GM [RESOLVED!]Problems with multiple movement inputs

    Let me get straight to the point. In my 2D side scroller my player doesn't react properly when I do certain inputs. For example, let's say I'm holding the right arrow so my player goes right. While holding right I push the left arrow as well. So I'm holding left AND right. Then I released right...
  8. D

    SOLVED How to lock x value to actual or lesser?

    I'm trying to make a object freeze it's positive x so it can slide walls on collision. Basically i have this check: if (!place_free(x + collisionOffset, y)) { } collisionOffset is a variable to determine how far the object will be from the collision point on the given coordinate (x+, x-...
  9. 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...
  10. 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...
  11. 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...
  12. 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. =]
  13. 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...
  14. 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...
  15. 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.
  16. 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...
  17. 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
  18. 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...
  19. 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...
  20. 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...
Top