Divinik
Member
So with my enemies/companions in the game I'm making (3/4 top down), I'm trying to figure out how to have them maneuver around around walls without paths when one is between the object and the player.
The code i have now is:
I was using paths to get them there, but I find them a bit buggy and inconsistent.
any alternatives to achieve this?
The code i have now is:
Code:
if !collision_line(x,y,player.x,player.y,obj_wall,false,false)
{
//move towards player
}
else
{
//mp path to player
}
any alternatives to achieve this?