bullet behavior: SET ANGLE

0 favourites
  • 4 posts
From the Asset Store
This pack contains 10 types of bullet effects, with different shapes and colors.
  • hello everyone,

    i have a quick question (looked everywhere and could not find an answer).

    the bullet behavior has a SET ANGLE property ("If set to No, the behavior will never change the object's angle. If set to Yes, the behavior always sets the object angle to the angle of motion.")

    is there any way to set this property at run time via events? i can change it easily in the properties window when developing, but wanted to know how to change the value dynamically while the game is running.

    any thoughts?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can always set the angle of the sprite in events, so you could also choose to set the angle of the sprite to be the same as the angle of the bullet motion through events.

  • i have done that, and that's how i want the sprite to behave in normal circumstances (ie, normal times the sprites angle is set to the angel of motion)...however, there are times when i want to disable that functionality so that the sprite is facing one direction and going another direction...and in those circumstances the sprite should not be the same as the angle of motion. you can set the angle property value to yes|no during the development drop-down menu...but cannot find a way to do so dynamically, via events.

    any help you can provide will be GREATLY appreciated.


  • You could just do this by specifying when the angle should be different and what you want the angle to be.

    in normal circumstances:

    every tick set bullet angle - sprite.bullet.angleofmotion

    mouse button left is down - sprite set angle towards position mouse.x, mouse.y

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