How do I Fix my angle of motion

  • I seem to be having an issue with a bullets angle of motion using 8 directional movement, the code I have below is actually working and changes the bullets direction on the horizontal axis (left, right) but it completely ignores the vertical axis (up, down)

    Is there no way to have the player.8Direction.MovingAngle encompass all directions instead of just left and right ? or am I just doing it wrong

  • It should work. Try disabling the speed, wait, and disabled actions to test again?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It should work. Try disabling the speed, wait, and disabled actions to test again?

    Your right, that worked correctly.

    But still.. How am I supposed to set a bullet speed if it breaks the player.angle..

  • Here's a quick capx with the movingangle working as expected.

    https://www.dropbox.com/s/haxr1kxufixvn ... .capx?dl=0

    See if that works for you?

    It might be the wait that is breaking yours, not the speed.

  • Here's a quick capx with the movingangle working as expected.

    https://www.dropbox.com/s/haxr1kxufixvn ... .capx?dl=0

    See if that works for you?

    It might be the wait that is breaking yours, not the speed.

    Oh.. I am currently on the stable release.. not beta <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad"> So can't open the file.

    Could I just get a screenshot ?

  • Basically it is the same as you did with the first two actions. Try leaving the speed action there and disabling the wait action and see what happens.

  • Basically it is the same as you did with the first two actions. Try leaving the speed action there and disabling the wait action and see what happens.

    Disabling wait only instantly disables the entire bullet action before it even gets to the player.angle lol.

    I don't understand why setting the bullets speed after it's angle would break the vertical axis of the bullets angle .. wtf ?

  • When you disabled wait did you also disable the bullet disable action too?

    Try setting a static speed and see what happens?

  • When you disabled wait did you also disable the bullet disable action too?

    Try setting a static speed and see what happens?

    I have to have the bullet disabled after it goes through that process.

    And yes, it works fine with a static speed set on it only I need it to be a random speed..

  • I think it is the wait that is stopping the event from updating the direction of the bullet. Try having the wait and stop in another event, maybe if Bullet is Moving - Wait 1, Stop Bullet by itself.

  • Put the set speed action above the set angle action.

  • Put the set speed action above the set angle action.

    That fixed it.

    Thanks for the help guys

    oosyrag

    LittleStain

  • Simple solution! Sorry I don't use behaviors much so wasn't familiar with the quirks.

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