Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 08-08-2004, 11:03 PM   #1
Banana61
Registered User
 
Join Date: Jul 2004
Posts: 10
Default [AS1] Platform game help

hi I'm making a platform game and I need to know how can I make him move

and play the running animation and so if he was running left it will stop and

he'll be standing left if hes running right it will stop and he'll be standing right

please help
Banana61 is offline   Reply With Quote
Old 08-09-2004, 06:12 AM   #2
Laguana
Well known nobody
 
Join Date: Jul 2004
Posts: 818
Default

Have a look at

http://www.actionscript.org/tutorial...sh/index.shtml

and then try to apply some of your own logic to it, to get the kind of game that you want it to be.
Laguana is offline   Reply With Quote
Old 08-12-2004, 10:46 PM   #3
Banana61
Registered User
 
Join Date: Jul 2004
Posts: 10
Default [AS1] game trouble

hi i'm making a platform game and I 'm trying to get my main character to

move left and play the animation I made for left but when he stops it goes to

standing left and if he moves right it plays tha animation and if he stops he

facing left so far I have this It works until I ad the walking left and the stop looking right

onClipEvent(enterFrame) {
if (Key.isDown(Key.RIGHT)) {
this._x += 5;
gotoAndStop("runR");
}else{
gotoAndStop("sr");
}
if(Key.isDown(Key.LEFT)) {
this._x -= 5;
gotoAndStop("runL");
} else {
gotoAndStop("sl");
}
}
dont send me to the tutorial at actionscript.com a lot of help that is

Last edited by Banana61; 08-13-2004 at 02:39 AM.
Banana61 is offline   Reply With Quote
Old 08-13-2004, 06:22 AM   #4
Laguana
Well known nobody
 
Join Date: Jul 2004
Posts: 818
Default

One thing that you could do, is instead of two seperate animations, you could have one animation and one stopping pose. Then you could use code like this

onClipEvent(enterFrame) {
if (Key.isDown(Key.RIGHT)) {
this._x += 5;
this._xscale = 100
this.play();
} else if (Key.isDown(Key.LEFT)) {
this._x -= 5
this._xscale = -100
this.play()
} else {
this.gotoAndStop(1)
}
}

Which stops the person facing the direction they last faced, and it means less animating, as it just switches which way the character is facing.
Laguana is offline   Reply With Quote
Old 08-13-2004, 07:06 PM   #5
Banana61
Registered User
 
Join Date: Jul 2004
Posts: 10
Default

thanx
Banana61 is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:50 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.