Construct 3 icon

Construct 3

Documentation

Bullet behavior script interface

Ashley's avatar
Medal
Construct Team Founder
Published 14 Oct, 2019
131 words
<1 min

The IBulletBehaviorInstance interface derives from IBehaviorInstance to add APIs specific to the Bullet behavior.

Bullet behavior APIs

speed

Set or get the current speed in pixels per second..

acceleration

Set or get the acceleration of the movement in pixels per second per second.

gravity

Set or get the downwards acceleration caused by gravity in pixels per second per second.

angleOfMotion

Set or get the current angle of movement in radians.

bounceOffSolids

A boolean indicating if the Bounce off solids property is enabled.

distanceTravelled

A number indicating the distance the bullet has travelled so far in pixels. Note this can also be set, such as to reset the counter.

isEnabled

A boolean indicating if the behavior is enabled. If disabled, the behavior no longer has any effect on the object.