Rotates a sprite or group of sprites by the selected amount. When used in a behavior, the turn command will give sprite the appearance that it is spinning.
Artist
If this block is being used with Artist, then by default, the sprite that will turn is the artist, as no other sprites can be generated in an Artist lesson. Therefore, this block's Artist version does not allow you to choose which sprite to turn.
Display Area | Code |
---|---|
![]() | ![]() |
![]() | ![]() |
Examples
Example 1
The toothbrush has been turned to make it look like it is in the sprite’s hand.
Example 2
The artist draws a square.
Syntax
turn
Parameters
Name | Type | Required? | Description |
---|---|---|---|
sprite | A sprite or group of sprites. Examples of blocks to attach here are | ||
direction | The direction the sprite will rotate, either "left" or "right". | ||
degrees | The amount of rotation in degrees. An |
Found a bug in the documentation? Let us know at support@code.org.