how to make a fighting game in flash pt 2 (evilryu2)

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
3,779
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Oct 3, 2009

order to put the anims. in:
standing
run right
run left
attack
jumping

put this in the main mc(replace GREATERTHAN with yhe actual sign cuz they dont let u put it in the description):

onClipEvent (load) {
speed = 20;
}
onClipEvent(enterFrame) {
if (!touchingGround) {
grav++;
this._y += grav;
} else {
grav = 0;
}
if (_root.ground.hitTest(_x,_y,true)) {
touchingGround = true;
} else {
touchingGround = false;
}
}
onClipEvent (enterFrame) {
if ((Key.isDown(Key.RIGHT)) && (jumping == false)) {
this.gotoAndStop(2);
}
if ((Key.isDown(Key.LEFT))&& (jumping == false)) {
this.gotoAndStop(3);
}
if (Key.isDown(Key.RIGHT)) {
this._x += speed;
}
if (Key.isDown(Key.LEFT)) {
this._x -= speed;
}
if (Key.isDown(65)) {
this.gotoAndStop(4);
}
}
onClipEvent(enterFrame) {
if (jumped) {
falling += 0.5;
_y += falling;
}
}
onClipEvent (load) {
y_start = _y;
jumping = false;
jumpspeed = 0;
}
onClipEvent (enterFrame) {
if (jumping) {
_y += jumpspeed;
jumpspeed += 1;
if (_yGREATERTHAN=y_start) {
_y = y_start;
jumping = false;
}
} else {
if (Key.isDown(Key.SPACE)) {
jumping = true;
jumpspeed = -14;
this.gotoAndStop(5);
}
}
if (_root.ground.hitTest(this._x, this._y, true) && falling) {
// if hitting X an Y postions with the ground and falling
jump = 12;
// jump is set to 9
jumping = false;
// jumping is false
falling = false;
// falling is false
}
}

put this in the last frame of each animation except for standing:

_root.ryu.gotoAndStop(1);

put this on of the frames inside of the main mc:

stop();

Category:

Gaming

Tags:

License:

Standard YouTube License

Link to this comment:

Share to:

Uploader Comments (itzmrrip)

  • **Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 45: Clip events are permitted only for movie clip instances onClipEvent (enterFrame) {

  • @BunkeyTheMunkey1 first, you put the code in the wrong place; use this UPDATED tutorial:

    /watch?v=ZrqpRcfaPN0

  • SLOW TYPING...

    

  • @brm117 Great.Thats nice to know.

  • dude what do you mean by replace GREATERTHAN with yhe actual sign

    please explain to me more

  • @mechsbattles in the code there is a giant 'GREATERTHAN'. replace it with >

see all

All Comments (47)

Sign In or Sign Up now to post a comment!
  • my character can only jump vertically, can't do a foward jump

  • @itzmrrip ok i got a problom wene i copy your action into the main frame it says it got probloms

  • player 2 want punch can you tell me why

  • how you damn put all the animations in one symbole?

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more