K
kmce
Guest
I have this code
This is in the enemy object and makes the enemy move towards the player. But I want him to basically be able to go to obj_john_torso_walking.x+5 or obj_john_torso_walking.x-5, is there anyway I could do this.
Ive tried
aswell as
But these dont seem to work. Is there actually a way to do it
Code:
///Move towards John
if distance_to_object(obj_john_torso_walking) < 100
{
mp_potential_step (obj_john_torso_walking.x+5,obj_john_torso_walking.y,1,false);
}
This is in the enemy object and makes the enemy move towards the player. But I want him to basically be able to go to obj_john_torso_walking.x+5 or obj_john_torso_walking.x-5, is there anyway I could do this.
Ive tried
Code:
///Move towards John
if distance_to_object(obj_john_torso_walking) < 100
{
mp_potential_step (obj_john_torso_walking.x+5 ||obj_john_torso_walking.x-5 ,obj_john_torso_walking.y,1,false);
}
Code:
///Move towards John
if distance_to_object(obj_john_torso_walking) < 100
{
mp_potential_step (obj_john_torso_walking.x+5,obj_john_torso_walking.y,1,false) || mp_potential_step (obj_john_torso_walking.x-5,obj_john_torso_walking.y,1,false);
}