How do I solve this problem

  • I'm sorry for this Question , im a beginner and i have a big problem.

    My platform character is shooting bullets with a pistol and i want to make it to shoot bullets in front of him.

    If i press "D" it will have the face in right and it will shoot bullets in right.

    But if i press "A" it will have the face in left but shoot the bullets in right.

    Notice :

    It has tha Animation "mirrored" (Set Mirrored)

    and I try to make him shoot left with this:

    Player is mirrored -> set bullet angle 180

    Problem when i shoot and quickly turn the bullet wich was shoot come back in the other position

    What must i do ? to shoot like right , left ?

  • When you do "Set bullet angle 180", make sure that, in the same event, you are creating the bullet before you set the bullets angle, so that Construct 2 knows which bullet to pick to change the angle of.

    So lets say "Space" shoots a bullet, it should look like:

    "Space" is pressed

    Is Mirrored

    Create object "Bullet"

    Set Bullet angle to 180

    "Space" is pressed

    Is NOT Mirrored

    Create object "Bullet"

    Set Bullet angle to 0

    [You could make this into sub events to be efficient but it's not important ]

    What this does, is when you create the "Bullet", Construct 2 then focuses on that particular bullet and WILL NOT affect other bullets.

    If you did this as an event instead:

    "Space" is pressed

    Is Mirrored

    Set Bullet angle to 180

    Create object "Bullet"

    Then it will first detect all bullets and set their angle to 180, THEN create a new bullet and not even set its angle!

    Hope this helps.

  • In order of actions sequence you should also set the bullet speed before you give it in angle (if you have it set to 0 by default).

    Also keep in mind that a negative speed is left and positive speed is right. While this doesn't matter since your setting angle, I add it in case you ever want an object being moved with a bullet event to go from right to left, the bullet speed will need to be negative unless you set its angle manually.

  • OK so first

    Thank You for the quickly answers

    I tryed to did anything that Jase00 but i didn't succed

    if someoane could help me with this

  • Radule...

  • THANK YOU ! , You are THE BEST!!!!!!!!!

  • scirra.com forum/viewtopic.php?f=182&t=116600

    Can anyoane help me with this too?

  • Link don't working..

    Send me a private message..

  • i can't let me try again

    It is a space somewhere

    scirra .com/forum/viewtopic.php?f=182&t=116600

  • korbaach can you help me please ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Man,.....I still do not know what the problem is

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