(778) _AC_DIR_VAL
Effect
Turns the entity of the animation to a degree angle over a given amount of time.
Values greater than 360 are modulo'ed down actual_angle = angle % 360
.
The entity always makes the smallest turn possible. If the invert argument is provided, the entity will turn the longer way around.
If the turn distance is 180°, clockwise turns are done.
If the new angle equals the old angle and the direction is inverted the entity does a 360° turn.
info
- 0°, 360°, -360° = down
- 90°, -270° = left
- 180°, -180° = up
- 270°, -90° = right
Anything in between is also a valid value.
Syntax
_AC_DIR_VAL(time, angle, invert?)
Argument | Description | Types | Required |
---|---|---|---|
time | The amount of time to turn, in frames | Float | Required |
angle | The new angle | Float | Required |
invert | Whether to invert the turn | Any | Optional |
Example
anm_dummy:
_AC_DIR_VAL(8, 45)
_ACMD_END()
The above script will turn the entity to look down left at a 45° angle from the bottom.