M
MoltenCube
Guest
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 path_add() it doesn't light up yellow.
My code looks like this:
If anyone knows what I'm doing wrong please tell me. Thanks!
PS: This is my first time posting on a forum so please don't get mad at me if i broke any of the posting conventions.
[Solved]
I just found out that the issue was that i wasn't using the "standard edition" of game maker. I guess the function doesn't work if you are on the basic free version.
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 path_add() it doesn't light up yellow.
My code looks like this:
Code:
///Pathfinder
Grid = mp_grid_create(0,0, room_width / 32, room_height / 32, 32,32,32)
Path = path_add()
//Path
if (distance_to_object(Obj_Player) < 96)
{ mp_grid_add_instances(Path,Obj_Collision,true)
mp_grid_path(Grid,Path,x,y,Obj_Player.x,Obj_Player.y,false)
path_start(Path,1.5,"",true)
}
//Direction
if (Obj_Player.y > y)
{sprite_index = Spr_Player_D
}
if (Obj_Player.y > y)
{sprite_index = Spr_Player_U
}
if (Obj_Player.x > x)
{sprite_index = Spr_Player_R
}
if (Obj_Player.x < x)
{sprite_index = Spr_Player_L
}
PS: This is my first time posting on a forum so please don't get mad at me if i broke any of the posting conventions.
[Solved]
I just found out that the issue was that i wasn't using the "standard edition" of game maker. I guess the function doesn't work if you are on the basic free version.
Last edited by a moderator: