Loved it!
I like how you added stuff from your other submissions!
Loved it!
I like how you added stuff from your other submissions!
Nice Tutorial
But a lot of problems. I edited the script for the movement and I ended up with this and it works for me:
onClipEvent(load) {
var speed:Number = 10;
var walk:Number = 0;
var grav:Number = 0;
var falling:Number = 0;
var jumped:Boolean = false;
var jumpHeight:Number = 15;
var touchingGround:Boolean = false;
var scale:Number = _xscale;
}
onClipEvent(enterFrame) {
if (!touchingGround) {
grav++;
this._y += grav;
} else {
grav = 0;
}}
onClipEvent(enterFrame) {
if (_root.ground.hitTest(_x,_y,true)) {
touchingGround = true;
} else {
touchingGround = false;
}}
onClipEvent(enterFrame) {
if (Key.isDown(Key.LEFT)) {
_x -= speed;
this.gotoAndStop(2);
_xscale = -scale;
}}
onClipEvent(enterFrame) {
if (Key.isDown(Key.RIGHT)) {
_x += speed;
this.gotoAndStop(2);
_xscale = +scale;
}}
onClipEvent(enterFrame) {
if (jumped) {
falling += 0.5;
_y += falling;
if(touchingGround) {
jumped = false;
}
}else{
if(Key.isDown(Key.UP)){
jumped = true;
falling = -jumpHeight;
this.gotoAndStop(3);
}}
if ((Key.isDown(Key.UP)) and (Key.isDown(Key.LEFT))) {
this.gotoAndStop(3);
}}
onClipEvent(enterFrame) {
if ((Key.isDown(Key.UP)) and (Key.isDown(Key.RIGHT))) {
this.gotoAndStop(3);
}}
onClipEvent(enterFrame) {
if ((!Key.isDown(Key.UP)) and (!touchingGround)) {
this.gotoAndStop(3);
} else if ((Key.isDown(Key.UP)) and (!touchingGround)) {
this.gotoAndStop(3);
}}
onClipEvent(enterFrame) {
if ((_currentframe == 3) and (touchingGround)) {
gotoAndStop(1)
}
}
onClipEvent (keyUp) {
gotoAndStop(1);
Very nice Tutorial!
Would've liked a better Movement section though. I was looking for a tutorial that would teach something like 'when you press right, the character does a walking-right animation etc.' tutorial. Other than that, awesome tutorial! :)
Interesting.
Never heard of any of 'em.
niice
nice job man. fave wus hog tossin
woooow
woow trippy, yet fun. nice job
amazingly addictive
ive been playing for an hour and i wanted to get off but i cudnt. i got 18th place on easy XD
niice
lol im addicted to this game XD
Age 30, Male
Joined on 10/4/06