E
Emberex
Guest
Okay, I have this game where I need the "enemy" to move toward a target, then if there are no targets , move toward the player. I tried mp_potential_step, but they get weird around walls and sometimes won't find the opening. So I moved to trying mp_grid. In the page with mp_grid_path, it shows this code:
with (oZombie)
{
global.ePath = path_add();
if mp_grid_path(global.eGrid, global.ePath, x, y, oTarget.x, oTarget.y, 1)
{
path_start(global.ePath, 0, 3, 0);
}
}
I have changed some variables, but my issue is that the zombies won't even move, they just stand their. I know it's a simple problem, but I can't seem to find the issue. Any ideas?
with (oZombie)
{
global.ePath = path_add();
if mp_grid_path(global.eGrid, global.ePath, x, y, oTarget.x, oTarget.y, 1)
{
path_start(global.ePath, 0, 3, 0);
}
}
I have changed some variables, but my issue is that the zombies won't even move, they just stand their. I know it's a simple problem, but I can't seem to find the issue. Any ideas?