PDA

View Full Version : Help with walk/stop stuff -flaincluded



patricktheking
April 7th, 2005, 07:48 PM
Hey heres my char in the game im creating and im having trouble for him to stop moving after a key is released. Take a look at the code, which is all on the main guy. tell me what im doing wrong-go easy on me.

eiefai
April 7th, 2005, 09:05 PM
here it is

patricktheking
April 7th, 2005, 10:03 PM
here it is

um u didnt do anything... im making it so when my guy walks and a certain direction and when the key is lifted the mc of him walking tops and goes to a position of him standing in that direction...

and the code is identical to what i had originally

eiefai
April 8th, 2005, 12:04 AM
sorry, my mistake, i'll post the correct one in a few minutes

here it is:

patricktheking
April 8th, 2005, 12:47 PM
thank you very much! at first when you said you were done i thought you were joking lol.... i thought maybe i was missing something...
thanks though, appreciate it!

patricktheking
April 8th, 2005, 12:49 PM
just so i understand what you did... what is this part
onClipEvent (keyUp) {
tec = Key.getCode();
if (tec == 39) {
gotoAndStop(7);
} else if (tec == 38) {
gotoAndStop(3);
} else if (tec == 40) {
gotoAndStop(1);
} else if (tec == 37) {
gotoAndStop(5);
}
}

is it just it evaluated what just came up?

eiefai
April 8th, 2005, 11:39 PM
onClipEvent (keyUp) {
tec = Key.getCode();
if (tec == 39) {
gotoAndStop(7);
} else if (tec == 38) {
gotoAndStop(3);
} else if (tec == 40) {
gotoAndStop(1);
} else if (tec == 37) {
gotoAndStop(5);
}
}

this code only checks what key was down, then just stop in the frame that has the "stand" image

patricktheking
April 9th, 2005, 02:50 PM
ya figured so.... thanks