Left By Degs: Difference between revisions
(updates from Blockument) |
(Marked this version for translation) |
||
Line 17: | Line 17: | ||
<code>left by [number] degs</code> | <code>left by [number] degs</code> | ||
<!--T:7--> | |||
Inputs in this block: | Inputs in this block: | ||
#a number | #a number | ||
==Example== | ==Example== <!--T:8--> | ||
<!--T:9--> | |||
[[File:left_by_degrees_example.gif|alt=Left By Degrees example gif|thumb]] | [[File:left_by_degrees_example.gif|alt=Left By Degrees example gif|thumb]] | ||
[[File:left_by_degrees_example.png|alt=Left By Degrees example code|thumb]] | [[File:left_by_degrees_example.png|alt=Left By Degrees example code|thumb]] | ||
<!--T:10--> | |||
When the ‘forever’ button is toggled, the ‘Turtle’ agents move [[Special:MyLanguage/Forward|forward]] and turns left by a random number between -30 and 30, allowing them to wander [[Special:MyLanguage/Forward|forward]] in a random direction. | When the ‘forever’ button is toggled, the ‘Turtle’ agents move [[Special:MyLanguage/Forward|forward]] and turns left by a random number between -30 and 30, allowing them to wander [[Special:MyLanguage/Forward|forward]] in a random direction. | ||
Revision as of 18:25, 14 August 2023
Turns left by a specified number of degrees.
left by [_] degs
is a code block part of the Movement drawer.
Usage
left by [_] degs
orientates the agent in Spaceland to the left of its original heading by the inputted number of degrees during each Starlogo clock tick.
Syntax
left by [number] degs
Inputs in this block:
- a number
Example
When the ‘forever’ button is toggled, the ‘Turtle’ agents move forward and turns left by a random number between -30 and 30, allowing them to wander forward in a random direction.