Be a Supporter!

I have a character with 3 labeled frames of stand, walk and jump. This script works fine apart from that the jump frame does not play when I press UP and I have no idea why not.

onClipEvent(load){
var ground: MovieClip = _root.ground
var grav: Number = 0
var gravity: Number = 2
var speed: Number = 5
var maxJump: Number = -18
var touchingGround: Boolean = false
var scale: Number = _xscale
var Left: Boolean = true
}

onClipEvent(enterFrame){
_y += grav
grav += gravity

while (ground.hitTest(_x, _y, true)){
_y -= gravity
grav = 0
}

if (ground.hitTest(_x, _y+5, true)){
touchingGround = true
} else {
touchingGround = false
}

if (Key.isDown(Key.LEFT)){
_x -= speed
_xscale = +scale
gotoAndStop("walk")
} else if (Key.isDown(Key.RIGHT)){
_x += speed
_xscale = -scale
gotoAndStop("walk")
} else {
gotoAndStop("stand")
}
if (Key.isDown(Key.UP) && touchingGround){
grav = maxJump
gotoAndStop("jump")
}
}

Thanks for your help :D

Also, this script is much dervied from the Ultra Platformer Tutorial, so much thanks to the authors :D

Response to: i just got a tablet Posted August 29th, 2009 in Game Development

it depends if you can draw :/

Response to: My latest crap. Posted August 28th, 2009 in Game Development

ok, but kinda short :\

didn't like the new style so much

Response to: Tenacious D - Tribute - Collab Posted August 28th, 2009 in Game Development

Any parts left?

I'll make a demo thing tomorrows maybe-z

Response to: + The New Castle Crashers Collab + Posted August 28th, 2009 in Game Development

hey guyz can i joinn>?

jks

Response to: new madness quiz out soon Posted August 28th, 2009 in Game Development

tbh there's not much to know...

Response to: where to get energy blast attacks Posted August 28th, 2009 in Game Development

At 8/28/09 04:00 AM, Punisher33 wrote: i could do that to! But what about the sound effects where can i get those from?

You should try this thing called Google. It's kinda new-fangled but I'm sure you can get to grips with it.

Response to: My game Cyborg-beetle Posted August 27th, 2009 in Game Development

Pretty cool :)
Work on some good enemies + you might want to add jump.

Response to: _rotation Problem Posted August 27th, 2009 in Game Development

I'd assume it would be something like

If current rotation is more than 180 larger from goal
rotate right

If current rotation is more than 180 smaller from goal
rotate left

Don't know how you'd code it though :\

Response to: Flash is Locking Up Posted August 26th, 2009 in Game Development

How much memory does your computer have?

Response to: favorite video game charectors Posted August 26th, 2009 in Game Development

this is nothing to do with flash

Response to: Hey guys I've Made a "Game"... Posted August 26th, 2009 in Game Development

tbh the game could be a lot worse :)

Response to: happy birthday jtmb02 Posted August 26th, 2009 in Game Development

OMG happy birthdays

make a birthday game

Response to: Just got flash 8 pro... Posted August 23rd, 2009 in Game Development

No offence, but I'd make sure you knew all the fundamentals before animating/buying Flash * Professional :)

Response to: Medals? Posted August 23rd, 2009 in Game Development

'Cos otherwise people could just make games with loads of easy medals etc.

Response to: Need Artist for madness day 09 Posted August 23rd, 2009 in Game Development

If you're going to use actual madness sprites having an artist is pointless

Response to: how to make kewl game graphics? Posted August 22nd, 2009 in Game Development

Mainly cos I learnt it in illustrator so I'm not used to it in Flash

Response to: how to make kewl game graphics? Posted August 22nd, 2009 in Game Development

Bear in mind that Illustrator is primarily for making vector graphics, which you could make more easily in Flash. I do prefer the pen tool in Illustrator more whereas in Flash I don't use it.

Response to: logo Posted August 22nd, 2009 in Game Development

Looks pretty cool but I dunno what's up with the quality... remember animation is probably more important to get done first :)

Response to: Turning and moving. Posted August 22nd, 2009 in Game Development

I'd recommend Emanuele Feronato's flash tutorial (among other things) website.

There is a property "rotation" so (in AS2) you could have:

if (Key.isDown(Key.LEFT) {
movieclip.rotation += 5
}

etc.

Response to: how to make kewl game graphics? Posted August 22nd, 2009 in Game Development

I would assume people use Photoshop, but you could use Illustrator to make some graphics. If you want a sort-of textured style Photoshop is the way forward.

Response to: Newgrounds 24 Posted August 22nd, 2009 in Game Development

put me in it, cos i is a legendary flash animator etc.

jokes

Response to: Game artist Posted August 16th, 2009 in Game Development

Hah i like the art. Unfortunately i can't code for toffee. Or fudge.

Response to: Madness Carnage Collab Posted August 16th, 2009 in Game Development

I might.

Response to: Beginner friendly flash software? Posted August 16th, 2009 in Game Development

Dude, Flash is the ONLY Flash software.

Response to: Tom Fulp Collab Posted August 7th, 2009 in Game Development

If this gets off the ground it could be ok... i'll try making a test thing and see if i want to make it better :P

Response to: Check this ouT Posted August 7th, 2009 in Game Development

Pretty nice. Obviously the enemies look kind of lame... and add more attacks plz

Response to: why is my game running slow Posted August 7th, 2009 in Game Development

Works fine for me too.
btw, loving the flying system although the character is kind of odd...

Response to: Disabling the right-click menu... Posted August 7th, 2009 in Game Development

Good tutorial here: http://tinyurl.com/nr9e6u