For FaceDirection, I have just what you need.
Code: ags
If you want them to turn to face that particular direction, there's a slightly different function for that I wrote in my last game, but this version's in my latest build.
//Put in Script Header
enum Directions
{
eUp,
eDown,
eLeft,
eRight
};
//Put in Script
function FaceDirection (this Character*, Directions direction)
{
if (direction == eUp)
{
this.Loop = 3;
}
else if (direction == eDown)
{
this.Loop = 0;
}
else if (direction == eLeft)
{
this.Loop = 1;
}
else if (direction == eRight)
{
this.Loop = 2;
}
}
If you want them to turn to face that particular direction, there's a slightly different function for that I wrote in my last game, but this version's in my latest build.