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

need help with making auto path for enemy

S

SuperAzrai

Guest
i am trying to make my enemy to find his way to to player through obstacles
i am useing this
GML:
var path = path_add()
    mp_potential_path(path,obj_player.x,obj_player.y,20,326,true)
    path_start(path,5,path_action_stop,true)
but i dont want him to check only solid i want to to check a specific object like object block
 
G

Guimica

Guest
you should try mp_potential_path_object(), with this function you can check collision with a specific object
btw i think using path_add() in step event is a bad idea, it's better to create the path in create event
 
S

SuperAzrai

Guest
some howi get lag when my the enemy is after me when i colide with object block but when the enemy is dead so i dont get lags any more any ideas?
 
Top