Im Going to Pretty Soon start thinking about making a game.
... all i can say, the ONLY thing i can say, is...
onClipEvent (load) {
stop();
hitwallr = false;
hitwalll = false;
grav = 0;
jumping = true;
running = false;
_speed+=5
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT) and !jumping) {
gotoAndStop(2);
this._xscale = 100;
if (!hitwallr) {
this._x += 9;
running = true;
}
} else if (Key.isDown(Key.LEFT) and !jumping) {
gotoAndStop(2);
this._xscale = -100;
if (!hitwalll) {
this._x -= 9;
running = true;
}
} else {
running = false;
if (!jumping) {
this.gotoAndStop(1);
}
}
if (Key.isDown(Key.UP) and !jumping) {
if (!running) {
jumping = true;
grav = 15;
this.gotoAndStop(3);
} else if (Key.isDown(Key.RIGHT) and !hitwallr) {
this.gox = 11;
jumping = true;
grav = 14;
this.gotoAndStop(3);
} else if (Key.isDown(Key.LEFT) and !hitwalll) {
this.gox = -11;
jumping = true;
grav = 14;
this.gotoAndStop(3);
}
}
if (jumping) {
this.gotoAndStop(3);
this._y -= grav;
grav -= 4;
if (!hitwallr and !hitwalll) {
this._x += gox;
}
} else {
gox = 0;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.portal)) {
_parent.nextFrame();
}
}
And, Another thing i can say is....
onClipEvent(load) {
speed= 1;
}
onClipEvent(enterFrame) {
if(Key.isDown(Key.UP)) {
this. _x += speed * Math.sin(this._rotation*(Math.PI/180));
this._y -= speed *Math.cos(this._rotation*(Math.PI/180));
}
if (Key.isDown(Key.DOWN)) {
this. _x -= speed * Math.sin(this._rotation*(Math.PI/180));
this._y += speed *Math.cos(this._rotation*(Math.PI/180));
}
if (Key.isDown(Key.RIGHT)) {
this._rotation+=3
}
if (Key.isDown(Key.LEFT)) {
this._rotation-=3
}
}
onClipEvent(load) {
xspd = 0
yspd = 0
}
onClipEvent(enterFrame) {
this._x += xspd
this._y -= yspd
//if statements start now
if (Key.isDown(Key.LEFT)) {
xspd --
}
if (Key.isDown(Key.RIGHT)) {
xspd ++
}
if (Key.isDown(Key.UP)) {
yspd ++
}
if (Key.isDown(Key.DOWN)) {
yspd --
}
}
Dont Ask. Starting a game isnt as easy as you think. It Requires Concentration, and patiance. i know on several occasions where i have got so stressed that i just screw up the idea.
Ive heard someone Say this: Start With something Easy. Like pong!