AngleSet (SCTRL)

Started by JustNoPoint, October 22, 2015, 05:16:43 PM

Previous topic - Next topic

JustNoPoint

Sets the drawing rotation angle used by AngleDraw. The angle is initialized at 0.

Required arguments:

value = angle (float)
the value of angle is interpreted to be in degrees.

Optional arguments:
none

Example:
none

altoiddealer

An active AngleDraw controller is required for AngleSet to have any effect.

The same applies for AngleAdd and AngleMul


Ricepigeon

Note that if value is defined in the AngleDraw controller, that value will take precedence over the value stored by AngleSet. Additionally, the value set by AngleSet persists between states, including custom states set by player2

Therefore, if you plan to use AngleDraw for scaling a sprite, it is highly recommended using AngleSet to reinitialize the angle back to 0. In addtion to this, try to avoid using AngleSet in custom states for this same reason, otherwise you'll end up with some hilarious unintentional angle effects such as this: