• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

pathfinding

  1. brinycann0nade

    x and xprevious remaining the same when moving object on a path (check if moving) [SOLVED]

    I sort of have an idea of what to do but I can't quite get it. I have an object where I need to check if it's moving or not so I can change the sprite accordingly. It moves using a path for pathfinding. I know that x and x previous have something to do with the End Step event but I don't know...
  2. J

    Keep path-finding enemy from freezing when player collides.

    I have a game in which a enemy follows the player, it path-finds fine, just when the player collides with a wall, the enemy freezes. I tried using methods besides ticking Solid and I still get the same results. I have it on a 16x16 grid, it is simply when the player is next to a wall, the grid...
  3. A

     Pathfinding with TileMaps

    Hello! With the complete revamp to tiles I thought i'd have a look at a demo and see how to work with the new set of functions. I noticed the collision in the platformer-demo checked against an invisible tile layer with the tilemap_get functions. These functions return the number of a tile...
  4. Hermit

    Sideview AI pathfinding with stairs and depth in 2D

    I'm stumped on a good way to code this. My enemy AI needs to chase a goal that will move around a map with stairs but some of those stairs are on accessible floors. To illustrate this problem, the purple square is the enemy and the yellow circle is the goal. In this scenario the square must...
  5. T

    Legacy GM [SOLVED] What might be causing mp_grid_path to fail?

    Hey all, Title says it all really. I have a character that follows sounds (or the player if he sees them). After reaching the end of their 'investigation' they will wait 6 seconds and then return. However the mp_grid_path call keeps failing, and the character is not returning to their...
  6. Dagoba

    Legacy GM Pathfinding problem with a gate object

    Hi! I have a pathfinding on my object that roams randomly in a room. There are objects called "obj_gate" and I need to make it so, that if the gate is facing right, you can only enter the gate by walking to right from left. Whenever the object that roams will collide with the gates, the doors...
  7. mafon2

    Pathfinding with grid's shifted, Filling the grid

    I followed two of the most popular tutorials about pathfinding and got the amazing results I've been trying (with horrible results) to write algorithms for. Didn't know there's already built in stuff. But for some reason the grid instances appear shifted 16p down and 16p right, plus sometimes...
  8. D

    Legacy GM AI: Modeling imperfection

    Some quick background: I'm developing a game with one of the emphasis of design being sophisticated AI. Currently I have a simple ecosystem modeled on a map that is 120 cells by 120 cells. Each cell represents 1 meter or roughly three feet. In this map I have a randomized procgen terrain...
  9. A

    Legacy GM Nearest empty space to a point in an mp_grid

    Hey guys, does anyone know of a script or method for determining the nearest empty space to a point in an mp_grid? I'm wracking my brain trying to figure out the pathfinding for my game. Basically what I want is for the character to move to a certain point unless that point is occupied. If it...
  10. N

    Custom action at path end?

    Hello! I'm having difficulty understanding the pathing functions in GM:S - I'm attempting an "idle" state for an AI which computes the coordinates to a random cell in the grid, moves to it, then repeat the process once it reaches the end of its path. However, I cannot figure out how to set any...
  11. F

    Legacy GM Pathfinding AI with states

    Hi! I'm making an isometric action RPG using the same finite state machine as heartbeast's RPG-seies. I want to implement an AI-pathfinding system but I can't make it work. What i want is enemies that use the different states but also avoid obstacles such as walls and other stuff. This is the...
  12. Bingdom

    mp_grid - Closest point on a allowed cell to a forbidden cell

    Hello GMC! Today, i have encountered a really tough problem and i need help figuring it out. So basically i currently have set up my AI path finding using mp_grid, and everything is working fine EXCEPT when i try to set a path to a forbidden cell. I want to know how to make the AI to move to...
  13. G

    Help with pathfinding in a turn based game

    Hi, im triyng to make my enemies move when the player is in range in a roguelike turnbased game, like pkm mystery dungeon series, but i cant find a method to use the path integrated in gamemaker to make them move only one time during their turn,because i dont find how to know the x/y of the next...
  14. A

    Making enemies avoid each other [solved]

    Hi everyone. I need some advice for setting up enemy pathfinding. I'm working on a variation of a tower defence game where the enemies will advance towards a target, then start shooting it once they get in range. I've set up pathfinding using the grid system and it's working fine except... the...
  15. M

    Legacy GM Path Finding Issue - Path ends whenever player collides with the instance added

    Hello All, I am back again with a question regarding AI and path finding. I am currently using mp_grid as a way for enemy to do path finding, how I set this up is: Create Event: ai_grid = mp_grid_create(0,0,room_width/32,room_height/32,32,32); ai_path = path_add()...
  16. M

    Issue: path_add() is not a function?

    Hello and thank you for checking out my problem. I'm trying to add path finding to an enemy in my RPG game but game maker keeps telling me that the path_add() function doesn't exist. Whenever I insert a function into the code it lights up yellow to verify that it is reading it but when I type...
  17. sergeantIndie

    Legacy GM Turn-Based Strategy 101 video series

    GM Version: Game Maker: Studio Target Platform: PC centric Download: N/A (considering providing individual links for each video if people are interested) Links: Complete Tutorial Playlist Summary: Turn-Based Strategy is a complex genre, this is the first couple bits of my seventeen video series...
  18. S

    Trafic in my pathfinding

    HI, i have a game with a lot of objects with pathfinding. Some objects can go in the same coordinate x, y. When first object come in coordinate x,y, the other object change "target" and go in other coordinate x,y. The problem is sometimes when the first coordinate x,y are busy when the other...
  19. B

    Grid based pathfinding- Ai gets stuck at corners

    Hello GM-Community, In my game I use grid based pathfinding for my enemy ai. In theory everthing works fine but if the path goes around corners or is very near to my wall instances, the ai can get stuck or cannot even follow the path anymore at all. Solved: Changed the grid size to 16 by 16...
  20. W

    Legacy GM MP Grid Path Finding - get stuck at corners

    Hello GM Community, I have a problem with mp grid path finding. My grid size is 8 by 8 and I even placed my walls according to this grid, but often the ai gets stuck at corners or in walls if the path is too near to a corner or the destination too close to a wall. I already decreased the size of...
Top