paths

  1. FoxyOfJungle

    SOLVED PATHS: Get hspeed and vspeed of an instance ??

    Hello, I'm trying to acquire the vertical and horizontal speed of an instance in which is using a path, but apparently there is no way to do it... I just did this: CREATE EVENT: my_path = -1; alarm[0] = 2; STEP EVENT: // hspeed and vspeed hsp = x - xprevious; vsp = y - yprevious; ALARM 0...
  2. GargantulaKon

    GMS 2.3+ Sequences don't work when physics is enabled

    I originally used paths in order to animate instances that move in a physics world. It's a bit clumsy getting it set up, but it works. I was excited to try sequences to make it easier so I did the same thing in a fraction of the time using Sequences. Very cool, but the issue is when I dragged...
  3. MartinK12

    1. end current path, 2. move_towards_point(another path_position(0) ) and 3. once there start another path

    I’m building solution for crossroads in my tower defense game. Enemies move on path, once they hit object obj_choose_path they should end this path, choose another path, move to its start and once there start another path. 1. Can’t figure out how to check if they are already on another...
  4. MartinK12

    Tower defense - how to slow down tanks while their turn on smooth paths?

    TowerDefense game, tanks moving on smooth path. Paths go in all directions. I’d like to slow tanks down (reduce their speed) on path when they are turning so it looks better. Unfortunately I don’t have idea how to handle it based on path because path has plenty points to make turning look...
  5. Fluury

    GML Having an instance follow a path starting from a specific point in said path.

    Heya! I've got an issue I need to deal with, but sadly can't put my finger on on how to tackle it. I have a path made up of several points. For each of these points, I sometimes spawn an instance on the exact x/y of said point. This works fine. When the player enters the range of the...
  6. A

    [Solved] Issues with Paths, Direction, and Animation

    For context, I'm working on a top-down, tactics-style game. While the player is in battle, they pull up a menu, and to move, the player selects "Move" from the menu. From there, a grid selector is created, and each time the selector moves, it adds a new point to a created path. When the player...
  7. Y

    GML using place_meeting() in combination with a path to call its index

    Hello community, I am looking to program the following: - When object instance "A" crosses the position of a path in the room, recognize it and give me its index. The idea I have is to put objects (platforms) on top of a Path that I created within the room editor so it will recognize said...
  8. S

    GMS 2 path_delete not working 100%?

    I have a game that I am working on and recently started to play around with paths. I however, noticed that my game started to stutter over time and it just get worse and worse. I think I have narrowed down the issue to the path_delete function. At first I was creating paths in a list using...
  9. Z

    GMS 2 (SOLVED) Path transfer between rooms

    Hi everyone. For the game I'm making, I need a very small and manageable amount of NPC's. There paths are very straighforward, always move in straight lines, and don't need to "walk around" other objects. Basically, very scripted and simple stuff. I wanted to find the easiest possible way to...
  10. P

    Help with path_position variables

    Hey everyone, I've got what is probably a simple question: I have some code that changes some variables as the path_position of my "oSun" and part of my code runs fine, but the other part doesnt seem to do anything. So in my Create Event I have: nightAlpha = 0; path_position = room.x/2 +...
  11. P

    How to start a path at the centre of each room

    Hi everyone, I'm working on programming a sun/day cycle. I have the sun moving from east to west fine, and my shadows affected etc. However, I have it on a path, and I'd like the path to always begin at the centre of every room that has a sun. So here's my simple sun path start...
  12. P

    Need help with paths

    Hi everyone, I'm working on a day/night cycle and I have a path for my sun to follow, and keep in mind I have alot to learn, but I can't get it to work proper. Here's my simple code: Sun Script: path_start(pathSun, 20, path_action_restart, false); with(oParent) { //variables for shadows...
  13. C

    Legacy GM Multiple choice game, Paths/choices not working

    Hello I am fairly new to using GML and i'm using Gamemaker 1.4 to make a text adventure game with multiple choices and I have run into an issue that I cant seem to fix. Essentially when I play through the game if I make one choice it will take me down the path of the later choice, sorry for the...
  14. Rook

    GMS 2 Help with mp_grid and paths

    I'm making a stealth game where if the pursuer loses you they will return to the start and continue on their pre-set path I made via the path resource. Strangely though, before i was using if (abs(x - start_x) < 2 && abs(y - start_y) < 2) to return weather the enemy was at the start, which...
  15. TheRBZ

    Legacy GM [SOLVED] Object that follows in the Player's previous footsteps

    I've been looking through the manual to find a way to make an object follow the player while avoiding solid parts of the room, but I couldn't find a reliable way. The context here is I have an NPC that needs to follow the player. I thought about having the game remember the player's vsp...
  16. zampa

    GML Performance question

    Is it more efficient( from a memory stand point ) to make platforms move through paths or code? Thanks for the answer and happy holidays.
  17. zampa

    GML Path problem

    I was messing around with paths for now i just have a path that goes back anf foward. //create event spd = 2; path_start(path0,spd,path_action_reverse,false); These are the only 2 lines of code i use for now. So let us say i create a path that is 320 pixels long (i don't know exactly how long...
  18. P

    GMS 2 Stop object at end of path, then reverse motion

    I have an object on a path, that starts at 0 speed, and increases to 10 speed when the player interacts with it. Once it reaches the end of the path, I want it to stop for a few seconds, then go backwards until it's back at the start of the path. But nothing I try seems to work. I've tried...
  19. Pfap

    mp grid instance not following path

    My instance always successfully draws the path, but sometimes won't follow it. It seems that it is getting stuck somehow. Grid creation code global.grid_m = mp_grid_create(0, 0, room_width / 8, room_height / 8, 8, 8); mp_grid_add_instances(global.grid_m, wall, false); The above debugs...
  20. Simon Gust

    Legacy GM Path end issues [SOLVED]

    Hello, I’ve recently started learning paths and pathfinding. It works well and I undestand what the path functions and variables do. The problem I have is that path_position is based on distance. I wanted to end a path at the last point of the path but since paths always end at the start I...
Top