GameMakerHelpBlog

Sunday, January 6, 2008

Turn in one direction to a point

Hi

This script will turn an object from one direction to another ONE way

[code]

dir = point_direction(x,y,argument0,argument1)
if direction!=dir
{
if direction < dir
{
direction+=3
}
else
if direction > dir
{
direction-=3
}
}
else
{
direction = direction
}
[/code]

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home