Forum Topic: Ok, I need AS2 help:

(162 views • 8 replies)

This topic is 1 page long.

<< < > >>
Angry

Akunu

Reply To Post Reply & Quote

Posted at: 11/1/09 03:03 PM

Akunu NEUTRAL LEVEL 07

Sign-Up: 01/03/09

Posts: 20

http://akunumation.webs.com/gametest.htm ;
----------------------------------------
----------------------
So I go through all the trouble of coding up a quic test for a game i'm making in as2.
The Character (hank) is suppose to:
Walk (left and right)
Attack
Jump on to a platform
and be rebounded by boundaries.

so far, hank does 2 of the 4.
For some reason, the attack(a key) and jump ( up arrow) commands don't run.
Help?

BBS Signature

Misunderstood

havegum

Reply To Post Reply & Quote

Posted at: 11/1/09 03:23 PM

havegum DARK LEVEL 11

Sign-Up: 10/20/08

Posts: 474

"Page not found"


None

Akunu

Reply To Post Reply & Quote

Posted at: 11/2/09 08:48 AM

Akunu NEUTRAL LEVEL 07

Sign-Up: 01/03/09

Posts: 20

At 11/1/09 03:23 PM, havegum wrote: "Page not found"

Sorry:
http://akunumation.webs.com/gametest.htm

BBS Signature

None

EqualToCody

Reply To Post Reply & Quote

Posted at: 11/2/09 04:55 PM

EqualToCody FAB LEVEL 04

Sign-Up: 10/21/09

Posts: 60

It's hard to say why they don't work without seeing the code.

If the compiler doesn't put out any error messages then the if() section probably has some kinda problem.


Angry

zrb

Reply To Post Reply & Quote

Posted at: 11/2/09 08:08 PM

zrb LIGHT LEVEL 11

Sign-Up: 08/08/06

Posts: 4,549

At 11/2/09 08:48 AM, Akunu wrote: Sorry:
http://akunumation.webs.com/gametest.htm

Way to decompile Tom and Mindchamber's game to STEAL the art.
The least you could do is give credit.

School Sux ! || As :Main || As3: Main || Animation: Main || Flash Tutorials ||

BBS Signature

None

K-Guare

Reply To Post Reply & Quote

Posted at: 11/2/09 08:23 PM

K-Guare FAB LEVEL 17

Sign-Up: 05/23/08

Posts: 2,429

I can guarantee you this:
your code is doing exactly what you told it to do.
Post code, or be more specific.

Say this game is finished...what are you going to do? Submit it?
Nobody likes an exact copy game.

dr. seuss
"unless someone like you cares a whole awful lot, nothing is going to get better. it's not."

BBS Signature

None

7IsUnlucky

Reply To Post Reply & Quote

Posted at: 11/2/09 08:27 PM

7IsUnlucky FAB LEVEL 25

Sign-Up: 06/12/07

Posts: 1,965

Post some fucking code
I bet you didn't even write that

Programming languages I know: AS2 and TRS-80 BASIC

BBS Signature

None

zrb

Reply To Post Reply & Quote

Posted at: 11/2/09 09:23 PM

zrb LIGHT LEVEL 11

Sign-Up: 08/08/06

Posts: 4,549

At 11/2/09 08:27 PM, 7IsUnlucky wrote: Post some fucking code
I bet you didn't even write that

Be nicer, this isn't your help thread :)

School Sux ! || As :Main || As3: Main || Animation: Main || Flash Tutorials ||

BBS Signature

None

Akunu

Reply To Post Reply & Quote

Posted at: 11/2/09 10:15 PM

Akunu NEUTRAL LEVEL 07

Sign-Up: 01/03/09

Posts: 20

First of all: its not to submit, just practice for a different game.
Second, heres the script:
onClipEvent (load) {
var speed = 0;
var walk = 4;
var run = 6;
var grav = 0;
var falling = 0;
var jumped = false;
var jumpHeight = 15;
var touchingGround = false;
var scale = _xscale;
}

onClipEvent (enterFrame) {
if (!touchingGround) {
++grav;
this._y += grav;
} else {
grav = 0;
}
if (_root.ground.hitTest(_x, _y, true)) {
touchingGround = true;
} else {
touchingGround = false;
}
if (Key.isDown(37)) {
_x = _x - speed;
this.gotoAndStop(2);
_xscale = -scale;
}
if (Key.isDown(39)) {
_x = _x + speed;
this.gotoAndStop(2);
_xscale = scale;
}
if (Key.isDown(16)) {
speed = run;
} else {
speed = walk;
}
}

onClipEvent (enterFrame) {
if (jumped) {
falling += 0.5;
_y = _y + falling;
if (touchingGround) {
jumped = false;
} else {
if (key.isDown(38)) {
this.gotoAndStop(3);
jumped = true;
falling = -jumpHeight;
}
}
}
if (Key.isDown(38) and Key.isDown(37)) {
this.gotoAndStop(3);
}
if (Key.isDown(38) and Key.isDown(39)) {
this.gotoAndStop(3);
}
if (!Key.isDown(38) and !touchingGround) {
this.gotoAndStop(3);
} else {
if (Key.isDown(38) and !touchingGround) {
this.gotoAndStop(3);
}
}
if (_currentframe == 3 and touchingGround) {
gotoAndStop(1);
}
}

onClipEvent (keyUp) {
gotoAndStop(1);
}

onClipEvent (enterFrame) {
if (this.hitTest(_root.wall)) {
this._x -= speed;
}
if (this.hitTest(_root.wall2)) {
this._x += speed;
}
if (this.hitTest(_root.space)) {
this.gotoAndStop(8);
}
if (this.hitTest(_root.over)) {
_root.gotoAndStop(2);
}
}
}

BBS Signature

All times are Eastern Standard Time (GMT -5) | Current Time: 11:13 PM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!