hi im making a “complex” platform game. the default animation that is playing is the idle animation for when nothing is pressed.
the problem;
im trying to make it so when you press the RIGHT or LEFT key, the character plays the animation for running right. the problem im running into is
gotoAndPlay(18); … when i hold down the RIGHT key to go right… it keeps refreshing the command to go right so it keeps playing the first frame of the animation to run right
how can i get past this??
ive also tried
if ((!Key.isDown(Key.RIGHT) && (!Key.isDown(Key.LEFT))){
gotoAndPlay(6);
}
and this way the running animation is the default animation, and frame 6 is the idle animation for standing still
the reason this doesent work is because i have multiple ways to attack with CONTROL and SPACE. if i add a !key.isDown(KEY.SPACE)…ect then when i press space it just repeats the first frame of the attack… while at the same time solves my other problem of running
can someone post a way for me to do this
or contact me via AIM
jereminion
btw ill post theSWF
http://i5.photobucket.com/albums/y197/jereminion/smoothms.swf
controls:
arrow keys to move, up to jump
space to shoot
CTRL to slice
i based this game off of Kirupa’s example so plz dont accuse me of stealing since i gave cred