move_towards_point(x,y,sp)

Drag & Drop equivalent : GM004

 

x = the x axis position in the room that the object will move toward.

y = the y axis position in the room that the object will move toward.

sp = the speed which the object travels toward x,y

 

This function will move the object towards the point x,y, travelling at the speed sp.

 

Example

//enemy ai

if distance_to_object(obj_player) < 128 then

{

move_towards_point(obj_player.x,obj_player.y,4);

}

 

cityscape - Revision #1