Turon wrote:I've found that the bullets are less likely to overlap if your set it's speed to 10 or 20 like yvelocity -= 10;. I'm still working at it. one bug I can't understand is why shooting allows the player to fly.
schnellboot wrote:Turon wrote:I've found that the bullets are less likely to overlap if your set it's speed to 10 or 20 like yvelocity -= 10;. I'm still working at it. one bug I can't understand is why shooting allows the player to fly.
I cannot see anything.
Turon wrote:one bug I can't understand is why shooting allows the player to fly.
schnellboot wrote:Turon wrote:one bug I can't understand is why shooting allows the player to fly.
1. shooting -> state = STOP_LEFT;
2. STOP_LEFT -> allow jump
#define STOP_LEFT 0
#define OFF_GROUND 0
#define STOP_RIGHT 1
#define ON_GROUND 1
#define RUN_LEFT 2
#define RUN_RIGHT 3
#define JUMP_LEFT 4
#define JUMP_RIGHT 5
#define FALL_LEFT 6
#define FALL_RIGHT 7
#define SHOOT_LEFT 8
#define SHOOT_RIGHT 9
switch(state)
{
case STOP_LEFT:
break;
case STOP_RIGHT:
break;
case RUN_LEFT:
break;
case RUN_RIGHT:
break;
case JUMP_LEFT:
ChangeAnimation("Event Actor", "StandRight", NO_CHANGE);
state = STOP_LEFT;
break;
case JUMP_RIGHT:
ChangeAnimation("Event Actor", "StandLeft", NO_CHANGE);
state = STOP_LEFT;
break;
case FALL_LEFT:
ChangeAnimation("Event Actor", "StandRight", NO_CHANGE);
state = STOP_LEFT;
break;
case FALL_RIGHT:
ChangeAnimation("Event Actor", "StandLeft", NO_CHANGE);
state=STOP_RIGHT;
break;
case SHOOT_LEFT:
break;
case SHOOT_RIGHT:
break;
// turning animation
}
being = ON_GROUND;
switch(state)
{
case STOP_LEFT:
if(being == ON_GROUND)
{
ChangeAnimation("Event Actor", "JumpRight", NO_CHANGE);
player_collider.yvelocity=-12;
state = JUMP_LEFT;
}
break;
case STOP_RIGHT:
if(being == ON_GROUND)
{
ChangeAnimation("Event Actor", "JumpLeft", NO_CHANGE);
player_collider.yvelocity=-12;
state = JUMP_RIGHT;
}
break;
case RUN_LEFT:
ChangeAnimation("Event Actor", "JumpRight", NO_CHANGE);
player_collider.yvelocity=-12;
state = JUMP_LEFT;
break;
case RUN_RIGHT:
ChangeAnimation("Event Actor", "JumpLeft", NO_CHANGE);
player_collider.yvelocity=-12;
state = JUMP_RIGHT;
break;
case FALL_LEFT:
break;
case FALL_RIGHT:
break;
case SHOOT_LEFT:
break;
case SHOOT_RIGHT:
break;
// turning animation
}
being = OFF_GROUND;
Users browsing this forum: No registered users and 1 guest