8 Direction behavior script interface
I8DirectionBehaviorInstance interface derives from IBehaviorInstance to add APIs specific to the 8 direction behavior.
8 direction behavior APIs
- Stop the movement, setting the speed to 0.
- Invert the direction of motion. Useful as a simple way to bounce the object off an obstacle.
- Simulate one of the movement controls being held down. Useful when isDefaultControls is disabled. The control is provided as a string and must be one of
- Set or get the current speed in pixels per second. Note this cannot exceed
- Set or get the maximum speed in pixels per second.
- Set or get the acceleration/deceleration of the movement in pixels per second per second.
- Set or get the X and Y components of the movement in pixels per second.
- A boolean indicating if the default controls (using the arrow keys) are enabled.
- A boolean indicating if input is currently being ignored. If input is ignored, pressing any of the control keys has no effect. However, unlike disabling the behavior, the object can continue to move.
- A boolean indicating if the behavior is enabled. If disabled, the behavior no longer has any effect on the object.
Construct 3 Manual
You are here:
Search this manual:
This manual entry was last updated on 14 Oct, 2019 at 16:05