Character can shoot right but not left?

0 favourites
  • 8 posts
From the Asset Store
Shoot balls to destroy as many blocks as possible, at each stage the game will become more difficult.
  • I'm trying to make this platformer and the character has a bow they can shoot, when facing right my character can shoot it and the arrow bullet I made but when facing left it doesn't I have a seperate arrow that they shoot when facing left. Everything works for right but not left and the conditions are the exact same any help would be much appreciated.

  • This is my code for it

    + Gamepad: On gamepad 0 Button X pressed

    + OR Keyboard: On Q pressed

    ----+ Player: [X] Is animation "Attack" playing

    ----+ Player: [X] Is animation "Run" playing

    -----> Player: Set animation to "Attack" (play from beginning)

    --------+ Player: Direction = 0

    ---------> Player: Spawn Arrow on layer 1 (image point 1)

    + Gamepad: On gamepad 0 Button X pressed

    + OR Keyboard: On Q pressed

    ----+ Player: [X] Is animation "Attack" playing

    ----+ Player: [X] Is animation "Run" playing

    -----> Player: Set animation to "Attack" (play from beginning)

    --------+ Player: Direction = 1

    ---------> Player: Spawn BArrow on layer 1 (image point 1)

  • The arrow uses bullet physics correct? You want to mirror it when you are facing the opposite direction or set the angle to the bow/character angle.

  • The arrow uses bullet physics correct? You want to mirror it when you are facing the opposite direction or set the angle to the bow/character angle.

    I should've been more specific the problem I'm having isn't that the bullet is going the wrong way I have a specific sprite for when the character is facing left and it isn't spawning. The conditions and actions are the same for each

  • Post a link to your .c3p project, it will be easier to understand and help with your issue.

  • > The arrow uses bullet physics correct? You want to mirror it when you are facing the opposite direction or set the angle to the bow/character angle.

    I should've been more specific the problem I'm having isn't that the bullet is going the wrong way I have a specific sprite for when the character is facing left and it isn't spawning. The conditions and actions are the same for each

    Oh in that case you want it to be 1 arrow with 2 animation states. left and right. Then call the animation when you are facing the correspondent direction

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The property "Set angle" for the bullet behavior on your "BArrow" object needs to be set to false.

    You can also make sub-event 34 directly a sub-event of sub-event 29, so that a single top event (28) will check for the correct gamepad button or keyboard button press, and if neither "Attack" or "Run" animations are playing, depending on the direction it will shoot the "appropriate" arrow.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)