Backwards: Difference between revisions
(updates from Blockument) |
(Marked this version for translation) |
||
Line 20: | Line 20: | ||
# a number | # a number | ||
==Example== | ==Example== <!--T:7--> | ||
<!--T:8--> | |||
[[File:backwards_example.gif|alt=Backwards example gif|thumb]] | [[File:backwards_example.gif|alt=Backwards example gif|thumb]] | ||
[[File:backwards_example.png|alt=Backwards example code|thumb]] | [[File:backwards_example.png|alt=Backwards example code|thumb]] | ||
<!--T:9--> | |||
While the forever button is toggled, the turtle agents wander throughout spaceland randomly, turning by a random amount and moving [[Special:MyLanguage/Forward|forwards]]. However, a button, called ‘Reverse,’ can make the turtles move backwards instead. Pressing the ‘Reverse button twice will set the turtles moving forwards again. | While the forever button is toggled, the turtle agents wander throughout spaceland randomly, turning by a random amount and moving [[Special:MyLanguage/Forward|forwards]]. However, a button, called ‘Reverse,’ can make the turtles move backwards instead. Pressing the ‘Reverse button twice will set the turtles moving forwards again. | ||
Latest revision as of 17:01, 14 August 2023
Moves backwards a specified number of steps.
backwards [_]
is a code block part of the Movement drawer.
Usage
backwards [_]
moves the agent in Spaceland in the heading opposite that which it is facing. The renderer tweens the movement such that it appears the agent changes location smoothly instead of instantaneous.
Syntax
Inputs in this block:
- a number
Example
While the forever button is toggled, the turtle agents wander throughout spaceland randomly, turning by a random amount and moving forwards. However, a button, called ‘Reverse,’ can make the turtles move backwards instead. Pressing the ‘Reverse button twice will set the turtles moving forwards again.
Nuances
Because of the tweening effect, certain interactions can cause confusion. Click here to read more on how tweening can create confusing scenarios.