Page 1 of 1

Attack Animation

PostPosted: Sat Oct 01, 2011 2:54 pm
by praaab
ok i have my stick man using his sword attack and i have an on screen button, i want him so that if you press the button down and even hold it , he won't repeat the animation unless you click the button again. heres my code for the anime of mouse button down
Code: Select all
if(dir == 0)
{
     ChangeAnimation(player,"stickman attack left",NO_CHANGE)
}
if(dir==1)
{
    ChangeAnimation(player, "stickman attack right",NO_CHANGE)
}

Re: Attack Animation

PostPosted: Sat Oct 01, 2011 5:22 pm
by Kalladdolf
Add another event: "Animation Finish" -> Set the specific attack animation (example: "stickman attack left").
Script editor:
Code: Select all
if(dir == 0)
{
     ChangeAnimation(player,"stickman face left",NO_CHANGE)
}
if(dir==1)
{
    ChangeAnimation(player, "stickman face right",NO_CHANGE)
}


"stickman face left" and "stickman face right" would be the animations in which the character stands still and faces one particular way.