Attack Animation

Non-platform specific questions.

Attack Animation

Postby praaab » Sat Oct 01, 2011 2:54 pm

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)
}
praaab
 
Posts: 82
Joined: Sat Jun 18, 2011 2:14 pm
Score: 1 Give a positive score

Re: Attack Animation

Postby Kalladdolf » Sat Oct 01, 2011 5:22 pm

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.
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest