Forward: Difference between revisions

From StarLogo Nova Wiki
m (Fixed nuances header)
(duplicate file already uploaded)
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
<languages/>
<translate>
<!--T:1-->
[[Category:Movement]]
[[Category:Movement]]
<section begin="image"/>[[File:Forward Block.png|alt=The forward block|thumb]]<section end="image"/>
<section begin="image"/>[[File:Forward Block.png|alt=The forward block|thumb]]<section end="image"/><p id="tooltip">Moves forward a specified number of steps.</p>
 
<!--T:5-->
<section begin="name" />'''{{Block|forward [_]}}'''<section end="name" /> is a [[code block]] part of the [[Movement]] drawer.
<section begin="name" />'''{{Block|forward [_]}}'''<section end="name" /> is a [[code block]] part of the [[Movement]] drawer.
==Usage==
{{Block|forward [_]}} moves the [[agents|agent]]  in [[Spaceland]] in the [[heading]] it is facing. The [[Engine#rendering|renderer]] [[Engine#tweening|tweens]] the movement such that it appears the agent changes location smoothly instead of instantaneous.


===Syntax===
==Usage== <!--T:6-->
<code>forward [number]</code>
 
<!--T:7-->
{{Block|forward [_]}} moves the [[agents|agent]]  in [[Spaceland]] in the [[heading]] it is facing. The [[Engine#rendering|renderer]] [[Engine#tweening|tweens]] the movement such that it appears the agent changes location smoothly instead of instantaneous.
 
<!--T:2-->
==Syntax==
[[File:Forward Nums.png|right|alt=The Forward Block|thumb]]
<!-- <code>forward [number]</code> -->
Inputs in this block:
#a number
 
==Example== <!--T:8-->
 
<!--T:9-->
[[File:while_toggled_example.gif|alt=Forward example gif|thumb]]
[[File:while_toggled_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.


<!--T:3-->
== Nuances ==
== Nuances ==
Because of the [[Engine#tweening|tweening]] effect, certain interactions can cause confusion. [[Explaining Up Tweening Confusion|Click here to read more on how tweening can create confusing scenarios.]]
Because of the [[Engine#tweening|tweening]] effect, certain interactions can cause confusion. [[Explaining Up Tweening Confusion|Click here to read more on how tweening can create confusing scenarios.]]


<!--T:4-->
==Related Blocks==
==Related Blocks==
*{{Block|Backwards|backwards [_]}}
*{{Block|Backwards|backwards [_]}}
Line 17: Line 41:
*{{Block|up|up [_]}}
*{{Block|up|up [_]}}
*{{Block|down|up [_]}}
*{{Block|down|up [_]}}
*{{Block|Teleport To XYZ|teleport to x: [_] y: [_] z: [_]}}
*{{Block|Teleport To|teleport to x: [_] y: [_] z: [_]}}
</translate>

Latest revision as of 18:26, 16 August 2023

Other languages:
The forward block

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

The Forward Block

Inputs in this block:

  1. a number

Example

Forward example gif
Forward example code

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.

Related Blocks