0 Favourites

bullet behavior: SET ANGLE

  • 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?

  • 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.

    thanks.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • 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)
Similar Topics Posts Views Last Post
Unread hot topic
0 Favourites
[BEHAVIOR] Chipmunk Physics
673 82,513
nelostic's avatar
nelostic
Unread hot topic
0 Favourites
[Behavior] LiteTween
672 169,896
manujorgo's avatar
manujorgo
Unread hot topic
564 105,221
rexrainbow's avatar
rexrainbow