| Stryke |
05-16-2008 11:53 PM |
Player Direction moving to the direction of dropping object
Like in Era, your player's direction moves to the direction of the object that is to be dropped. How would I do this? I've tried these:
PHP Code:
if(DragItem.y < player.y)player.dir = 0;
if(DragItem.x < player.x)player.dir = 1;
if(DragItem.y > player.y)player.dir = 2;
if(DragItem.x > player.x)player.dir = 3;
PHP Code:
player.getdir(DragItem.x,DragItem.y);
PHP Code:
getdir(DragItem.x,DragItem.y);
It'd be nice if there was a function like player.dir.pointdirection(obj);
|