Help me please
2 posters
Page 1 of 1
Help me please
I don's know if this should be in the flash section or what but can you help me with some as please?
This is probably very simple to fix but i cannot figure it out.
I have a character who moves with the WASD keys, but i need it so he plays his walking cycles when i press the WASD keys.
I have a player holding a gun. Inside that mc there is the gun mc and the player with the movement frames inside. On the main timeline the player moves with:
onClipEvent(enterFrame){
if(Key.isDown(65)){ //left
_root.player._x -= 5;
}
if(Key.isDown(68)){//right
_root.player._x += 5;
}
if(Key.isDown(83)){//down
_root.player._y += 5;
}
if(Key.isDown(87)){//up
_root.player._y -= 5;
}
}
and turns to follow the mouse.
Inside the mc i have the gun and the player with movements.
Inside there i have 4 frames.
1st frame: Standing still (Has stop ()
2nd frame: Walking forwards/backwards
3rd frame: Walking left
4th frame: Walking right
on 2 frame, mc called "Characterwalking"
on 3 frame, mc called "playerleft"
on 4 frame, mc called "playeright"
Inside each of those mc's there is a stop(); on the first frame
Ok, i only told you all that incase you needed to know it to fix my AcSc.
What would you put in the WASD to make it play those frames?
Help please.
This is probably very simple to fix but i cannot figure it out.
I have a character who moves with the WASD keys, but i need it so he plays his walking cycles when i press the WASD keys.
I have a player holding a gun. Inside that mc there is the gun mc and the player with the movement frames inside. On the main timeline the player moves with:
onClipEvent(enterFrame){
if(Key.isDown(65)){ //left
_root.player._x -= 5;
}
if(Key.isDown(68)){//right
_root.player._x += 5;
}
if(Key.isDown(83)){//down
_root.player._y += 5;
}
if(Key.isDown(87)){//up
_root.player._y -= 5;
}
}
and turns to follow the mouse.
Inside the mc i have the gun and the player with movements.
Inside there i have 4 frames.
1st frame: Standing still (Has stop ()
2nd frame: Walking forwards/backwards
3rd frame: Walking left
4th frame: Walking right
on 2 frame, mc called "Characterwalking"
on 3 frame, mc called "playerleft"
on 4 frame, mc called "playeright"
Inside each of those mc's there is a stop(); on the first frame
Ok, i only told you all that incase you needed to know it to fix my AcSc.
What would you put in the WASD to make it play those frames?
Help please.
Fridgeclock- Newbie
- Number of posts : 1
Registration date : 2008-12-28
Re: Help me please
For each of them, inside the brackets, put _root.player.gotoAndStop(FRAME GOES HERE)
e.g.
if(Key.isDown(65)){ //left
_root.player._x -= 5;
_root.player.gotoAndStop(3) //3 is the frame where the player faces left
}
Hope it helps
e.g.
if(Key.isDown(65)){ //left
_root.player._x -= 5;
_root.player.gotoAndStop(3) //3 is the frame where the player faces left
}
Hope it helps
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|