|
-
Vox
Here's an idea, it uses functions and will make your code a LOT smaller:
instead of:
if (_root.guy.highkick.highkick.hitTest(this)) {
this.scores.gotoAndPlay("score100");
scores._xscale=this._xscale;
_root.panel.score += 100;
gotoAndPlay ("death4");
} else if (_root.guy.lowkick.lowkick.hitTest(this)) {
this.scores.gotoAndPlay("score100");
scores._xscale=this._xscale;
_root.panel.score += 100;
gotoAndPlay ("death3");
use this:
if (_root.guy.highkick.highkick.hitTest(this)) {
hitcode("death4")
} else if (_root.guy.lowkick.lowkick.hitTest(this)) {
hitcode("death4")}
function hitcode(flabel){
this.scores.gotoAndPlay("score100");
scores._xscale=this._xscale;
_root.panel.score += 100;
gotoAndPlay (flabel);}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|