Re: Moonwalk
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
I think this will work, if you don't have any other factors for movement.
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.