you can jump left no problem it displays the correct animation, and you can jump right no problem and it will still display the correct animation, however if you jump without pressing any directional keys while in a right position the player will proceed to jump jump however it will not play out the jump right animation and will stay in a standing position until the falling animation kicks in...
This reminds me of something..
Here is the Code:
Keydown Left
- Code: Select all
switch(STATE)
{
case 0:
ChangeAnimation("Event Actor", "StillLeft", NO_CHANGE);
STATE=1;
break;
case 1:
ChangeAnimation("Event Actor", "MoveLeft", NO_CHANGE);
STATE=3;
break;
case 2:
ChangeAnimation("Event Actor", "StillLeft", NO_CHANGE);
STATE=1;
break;
case 3:
break;
case 4:
ChangeAnimation("Event Actor", "JumpLeft", NO_CHANGE);
STATE=5;
break;
case 5:
break;
case 6:
ChangeAnimation("Event Actor", "FallLeft", NO_CHANGE);
STATE=7;
break;
case 7:
break;
}
x-=3;
Keydown Right
- Code: Select all
switch(STATE)
{
case 0:
ChangeAnimation("Event Actor", "MoveRight", NO_CHANGE);
STATE=2;
break;
case 1:
ChangeAnimation("Event Actor", "StillRight", NO_CHANGE);
STATE=0;
break;
case 2:
break;
case 3:
ChangeAnimation("Event Actor", "StillRight", NO_CHANGE);
STATE=0;
break;
case 4:
break;
case 5:
ChangeAnimation("Event Actor", "JumpRight", NO_CHANGE);
STATE=4;
break;
}
x+=3;
Keydown X (Jump Key)
- Code: Select all
switch(STATE)
{
case 0:
ChangeAnimation("Even Actor", "JumpRight", NO_CHANGE);
yvelocity=-10;
STATE=4;
break;
case 1:
ChangeAnimation("Event Actor", "JumpLeft", NO_CHANGE);
yvelocity=-10;
STATE=5;
break;
case 2:
ChangeAnimation("Event Actor", "JumpRight", NO_CHANGE);
yvelocity=-10;
STATE=4;
break;
case 3:
ChangeAnimation("Event Actor", "JumpLeft", NO_CHANGE);
yvelocity=-10;
STATE=5;
break;
case 4:
break;
case 5:
break;
case 6:
break;
case 7:
break;
}
KeyUp Left
- Code: Select all
switch(STATE)
{
case 0:
break;
case 1:
break;
case 2:
break;
case 3:
ChangeAnimation("Event Actor", "StillLeft", NO_CHANGE);
STATE=1;
break;
case 4:
break;
}
KeyUp Right
- Code: Select all
switch(STATE)
{
case 0:
break;
case 2:
ChangeAnimation("Event Actor", "StillRight", NO_CHANGE);
STATE=0;
break;
case 1:
break;
case 3:
break;
case 4:
break;
case 5:
break;
case 6:
break;
case 7:
break;
}