Forward

From StarLogo Nova Wiki
Revision as of 18:36, 16 August 2023 by FuzzyBot (talk | contribs) (Updating to match new version of source page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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