Moonwalk

Non-platform specific questions.

Re: Moonwalk

Postby skydereign » Thu Mar 19, 2009 12:54 am

One way to prevent that is to not let Samus run, though I believe you don't want that. Another is to set a running variable, or a crouch variable. Essentially you need a variable to determine when running or change of animation for that matter is allowed. You could also just stick all of the ChangeAnimation into DrawActor, but then it could get a lot more complicated.
I think you could get away with this though... It would follow the method you have been using thus far.
Samus->KeyUp(d)->Script Editor
Code: Select all
char* key=GetKeyState();
if (key[KEY_a]==0 || key[KEY_d]==0)
{
    if (side1==1) ChangeAnimation("Event Actor", "Samus Stop Right", FORWARD);
    if (side1==0) ChangeAnimation("Event Actor", "Samus Stop Left", FORWARD);
}
else if (key[KEY_a]==1 || key[KEY_d]==1)
{
    if (side1==1) ChangeAnimation("Event Actor", "Samus Right", FORWARD);
    if (side1==0) ChangeAnimation("Event Actor", "Samus Left", FORWARD);
}

I think this will work, if you don't have any other factors for movement.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Moonwalk

Postby BlarghNRawr » Sat Mar 21, 2009 2:50 pm

ok thanx i think that might work +1 :D
Download Game Music
current projects:
Bold! ?% Started mechanics
Unnamed puzzle game 60% --i need a name!--
User avatar
BlarghNRawr
 
Posts: 767
Joined: Wed Jun 25, 2008 12:36 am
Location: Not using G-E anymore. Now using Source SDK.
Score: 27 Give a positive score

Previous

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron