void ASBS(char *ANAME, int animation_direction)
{
if (animindex != getAnimIndex(ANAME))
{
ChangeAnimation("Event Actor", ANAME, animation_direction);
}
}
x=Player.x;
y=Player.y;
if (dir==1)
{
if (swing==0)
{
ASBS("right", FORWARD);
}
else
{
ASBS("swingright", FORWARD);
}
}
else
{
if (swing==0)
{
ASBS("left", FORWARD);
}
else
{
ASBS("swingleft", FORWARD);
}
}
if (swing)
{
DestroyActor("Event Actor");
}
To make the animations better, Have player animations for swinging to make it look like he is swinging the sword.
Users browsing this forum: No registered users and 1 guest