[SOLVED]Bullet Direction

0 favourites
  • 5 posts
From the Asset Store
Rotate & Animation for 16 Direction & Mouse Direction
  • Hi, I'm new to Construct. I've gone through most of the beginner tutorials but I still can't figure this out!

    I have a basic platformer. The character has the platform behavior. The bullets work but will only shoot one direction no matter what.

    Example: If the character is facing right, the bullets shoot right. If the character is facing left, the bullets shoot right. @

    I thought I could fix this with some kind of check when the bullet button is pressed, but I just can't figure it out.

    Any help would be extremely appreciated!

  • If you're using the bullet behavior just set the bullet's angle to the player's angle.

  • Or set the angle of the bullet according to if the sprite is mirrored or not.

    If mirrored => 180, if not => 0

    This should do the trick.

    There's at least one example in the how do I FAQ but I can't remember if it is up to date or not.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • How exactly would one do that? I'm checking the bullet behavior setting and the only option is "Set Angle - Yes or No".

    Would I need to do this with an action?

    Sorry for my silly questions.

    EDIT: I didn't see the reply above this one, let me check it out! Thanks for the help guys.

    OK, I found the help I needed: scirra.com/forum/platform-game_topic46666.html

    Seems this has been asked before. Sorry!

  • This seems like the most appropriate place to post about bullet direction...

    I set the angle of the Bullet to 180 degrees but its behaviour wasn't remotely as expected.

    Whether or not the bullets are fired at 180 degrees seems to depend on how rapidly I press the shoot key (space-bar). E.g - if I press the space bar only after the previous bullet has disappeared from the screen then the bullets are fired at approximately 45 degrees, but if I press fire again before the bullet is completely off screen then it fires out at approximately 135 degrees and will only fire at 180 degrees if the space-bar is pressed rapidly within short duration between presses.

    Does anyone have any idea as to why this could have happened?

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