I will try my best not to make this confusing for early beginnersWell I'm not really good with these things but I just wanted to help out a few people who might have some sort of confusion when trying to get there animations right in a simple platform game!
Well you see first of all when you are using a code like this:
You have to make sure that when you put your animations in a movie clip and using this
That Each Different Animation Inside The Movie Clip Should Have
Now you might be getting a little confused so i will provide some pictures for you.
Here We Have Our Main Movie Clip:
http://i40.tinypic.com/xlgex0.jpgAnd Inside The Movie Clip We Have Two Frames.
And Each Frame Contains A Certain Kind Of Animations with both frames having
on the frame actions!
Now what i think confuses people is that they get all of the animations they want and just put them inside the one movie clip and then they put
thinking that its going to work when it actually freezes the animations and only plays when you let the left or right key go.
Now is that the right way to do it?
NO ITS WRONG! NO COOKIES FOR UYou see inside the main movie clip you need to take the first sprite in the first frame and convert it into another movie clip!
(give it any name you want for its mc name)*buy for now well call it MC ANIM 1
http://i40.tinypic.com/1z3qs9e.pngAnd What you do then is you put all of the animations inside that movie clip!
**note do not put stop on these frames *inside MC ANIM 1, just put them in and leave it alone*
Once done that click back on the mc inside main movie clip that has to two frames with the
on it
and do the same thing for the second frame!(insert the first sprite for the running animation and make it a movie clip*call it whatever you want*
And Put all of your running sprites in there!*once done go back to the mc inside main movie clip again.
And Once Done That Take This Code Right Here*btw i posted it above to*
*note where it says PLAYER you need to make the instance name of your character a player*
Thx for reading and here's an example of An Early Blade hedgehog Test Movement Engine I Made!
Press left arrow key for running, right arrow key for running, up arrow key to jump *note haven't added an jumping animation yet*Oh and hold shift + and arrow key left or right to run faster.
And Here's What It Should Look Like!
http://www.newgrounds.com/dump/item/0ce ... 8e5a9dba46And Here's A Copy Of The .fla File for you to use!
http://www.newgrounds.com/dump/item/e25 ... bc7e1d2398*note i had my own custom vcam that was used to follow the player and have the background stay in the same position*
And I really don't feel like providing the link to my vcam or giving a code to the commands to follow the player right now because its 2:08 where i live and i need to get up at 7:00 a.m. in the morning to get ready for high school.*although there is a topic somewhere in this section where x2i provided a link to it)
Thanks for reading and I am very glad to help! :3 And If you need any more help or you want comment or provide any suggestions feel free to post in this topic ^_^Oh and i still need help on making simple hit test walls because mine don't seem to work xD