N
no1youngin
Guest
working on this same game found a enemy code a while back and used it and it works fine! not complex at all the enemy comes at me nothing else to it, but I want the enemy to only chase the player only after it gets so close (~10 blocks away)
i typed this in:
if(point_distance(obj_player.x, obj_player.y, x, y) <= 10)
{
move_towards_point(obj_player.x, obj_player.y, 2);
}
...but for some reason it does not work i think its something to do with the <= but ive tried doing > and take out the = but for some reason it doesn't work and I can't seem to wrap my noob head around it! help!
i typed this in:
if(point_distance(obj_player.x, obj_player.y, x, y) <= 10)
{
move_towards_point(obj_player.x, obj_player.y, 2);
}
...but for some reason it does not work i think its something to do with the <= but ive tried doing > and take out the = but for some reason it doesn't work and I can't seem to wrap my noob head around it! help!