PDA

View Full Version : Character Movement Jump


uzumaki_1
02-21-2008, 06:39 PM
Hey there all am new to actionscript.org and also a newbie in actionscript !!

So for my uni project am trying to make a video game in Flash and what iv've done is got a tutorial from this webbie: http://www.gotoandplay.it/_articles/2006/06/beatemup.php

So what my problem is that am stuck on the character "jump" part. I need my character to jump and its not doing that and am only understanding a bit of the coding....could someone help me please.. (and cause am a retard at actionscript could you explain it as well :eek:) ..i need to get the basic movements started by this week or else i'll have to scrap the idea and make sum shit quiz !!

Thank You in advance !!!

P.S. I've also included the file here just in case the other attachment dnt work: http://www.megaupload.com/?d=XXX7C04H

rrh
02-21-2008, 07:35 PM
Here's a start:
if (rick_mc.attack == false) {
if (Key.isDown(Key.UP)) {
rick_mc.gotoAndStop("jump");
} else if (Key.isDown(Key.RIGHT)) {

....

uzumaki_1
02-22-2008, 08:49 AM
hey there...thanks for replying but i cant seem to get the character to jump still....could you tell me if you tried it in the coding thats attached to the movie clip and if it worked for you ?

rrh
02-22-2008, 04:22 PM
Wherever it was that you had:
if (Key.isDown(Key.RIGHT)) {
I put that code in instead. It didn't fully work as a jump, but Rick did change to the jump pose when I pushed up. To complete it, you would also want to add some stuff like upwards momentum. You may need instead of the code
if (rick_mc.attacking==true)
use
if ((rick_mc.attacking==true)&&(rick_mc.jumping==true)) {
..} else if ((rick_mc.attacking==true)&&(rick_mc.jumping==false)) {
..} else if ((rick_mc.attacking==false)&&(rick_mc.jumping==false)) {
..} else if ((rick_mc.attacking==false)&&(rick_mc.jumping==true)) {
just so you can cover all states.