• 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!

Legacy GM enemies ignoring mp_potentials_step

Y

Yvalson

Guest
so for some reason my enemies aren't avoiding obstacles.
here is the code:

Code:
if(!global.Pausing && distance_to_object(Obj_Munna) > 24){
    image_angle=point_direction(x,y,Obj_Munna.x,Obj_Munna.y)
    direction = image_angle
    mp_potential_step_object(Obj_Munna.x, Obj_Munna.y, 3.5, Obj_Controller3)
}
Obj_Controller3 is the parent of all the obstacles in the room and is solid. but for some reason it isn't working (I don't to use grid based player following because my player can move around freely as well.)
 
T

trentallain

Guest
so for some reason my enemies aren't avoiding obstacles.
here is the code:

Code:
if(!global.Pausing && distance_to_object(Obj_Munna) > 24){
    image_angle=point_direction(x,y,Obj_Munna.x,Obj_Munna.y)
    direction = image_angle
    mp_potential_step_object(Obj_Munna.x, Obj_Munna.y, 3.5, Obj_Controller3)
}
Obj_Controller3 is the parent of all the obstacles in the room and is solid. but for some reason it isn't working (I don't to use grid based player following because my player can move around freely as well.)
Try putting // in front of the direction part and then test it. I have a feeling that might be the problem
 
Top