Jump to content


cowcow888

Member Since 18 Mar 2012
Offline Last Active Apr 04 2012 10:30 PM

Posts I've Made

In Topic: Help with Mob Range

20 March 2012 - 11:45 PM

Providing your blocks are of uniform size you can use a simple distance check which will create a circle around the enemy in which it would follow the player. The example posted above assumes 1 block is 1 pixel which is likely not the case, you'll need to multiply the 10 by the length/width/size of one of your blocks.

Thanks :D

In Topic: Help with Mob Range

20 March 2012 - 11:44 PM

in the step event of the mob

if point_distance(x,y,obj_player.x,obj_player.y)<=10
{
     move_towards_point(obj_player.x,obj_player.y,[whatever speed you want]);
}
else
{
     speed=0;  //assuming if it's out of range you want it to stop moving..
}

Could you please tell me what i would change point_distance to if i want to make it avoid the solid objects

In Topic: AI Stop Chasing Help *Solved*

18 March 2012 - 09:55 PM

Do you mind sending me the code that you use to do this it would be realy nice  :biggrin: