Forward: Difference between revisions
(updates from Blockument) |
(Marked this version for translation) |
||
Line 21: | Line 21: | ||
#a number | #a number | ||
==Example== | ==Example== <!--T:8--> | ||
<!--T:9--> | |||
[[File:forward_example.gif|alt=Forward example gif|thumb]] | [[File:forward_example.gif|alt=Forward example gif|thumb]] | ||
[[File:forward_example.png|alt=Forward example code|thumb]] | [[File:forward_example.png|alt=Forward example code|thumb]] | ||
<!--T:10--> | |||
When the ‘forever’ button is toggled, the ‘turtle’ agents move forward by one step, while also turning randomly, allowing them to wander randomly throughout spaceland. | When the ‘forever’ button is toggled, the ‘turtle’ agents move forward by one step, while also turning randomly, allowing them to wander randomly throughout spaceland. | ||
Revision as of 16:59, 14 August 2023
Moves forward a specified number of steps.
forward [_]
is a code block part of the Movement drawer.
Usage
forward [_]
moves the agent in Spaceland in the heading 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
When the ‘forever’ button is toggled, the ‘turtle’ agents move forward by one step, while also turning randomly, allowing them to wander randomly throughout spaceland.
Nuances
Because of the tweening effect, certain interactions can cause confusion. Click here to read more on how tweening can create confusing scenarios.