0 Favourites

How do I set angle of motion for bullet

  • The bullet keeps changing angle as the character changes his!

    I set the "Set Angle" to "No" and do it like this.

    How should I do it then?

  • If this is the only event affecting the bullet angle of motion it will only change on the moment the space bar is pressed..

    So every time the space bar is pressed all bullets on screen will set their angle of motion to the angle of tutu..

    I'm not sure what you want to change about this, so more explanation is nescessary..

  • If this is the only event affecting the bullet angle of motion it will only change on the moment the space bar is pressed..

    So every time the space bar is pressed all bullets on screen will set their angle of motion to the angle of tutu..

    I'm not sure what you want to change about this, so more explanation is nescessary..

    You just explained the whole thing impressively!

    What I wanted is to make the bullets that were spawned on the "Spacebar" press to keep going to the end of the layout rather than changing angle when the character changes his angle and "Spacebar" is pressed again.

  • I explained what the event you created does..

    If you want it to do anything different, you should change the event..

    You could solve it by by:

    on spacebar pressed

    spawn bullet

    bullet set angle of motion..

    or

    on bullet created

    bullet set angle of motion

    or any other event referencing the bullet you want to affect..

    Right now there is no reference to the bullet, so all bullets are affected.

    By placing it under the create action, the bullet in the next line is the one just created..

    By using the on created event, you are referencing the bullet..

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • I explained what the event you created does..

    If you want it to do anything different, you should change the event..

    You could solve it by by:

    on spacebar pressed

    > spawn bullet

    > bullet set angle of motion..

    or

    on bullet created

    > bullet set angle of motion

    or any other event referencing the bullet you want to affect..

    Right now there is no reference to the bullet, so all bullets are affected.

    By placing it under the create action, the bullet in the next line is the one just created..

    By using the on created event, you are referencing the bullet..

    Solved all thanks to you. LittleStain

    I did as you said and made the "Set Angle" request to be after "On created"

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