Yield

From StarLogo Nova Wiki
Revision as of 18:07, 16 August 2023 by Admin (talk | contribs) (duplicate file already uploaded)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Other languages:
The Yield Block

Works as a pause in the current stack of code for 1 tick.

Example

Yield example gif
Yield example code

Yield can be used to complete tasks sequentially. In this example, when ‘celebrate’ is pushed we see that after each yield block a new forward step is taken. This shows that the yield block pauses the current set of instructions for one tick of the StarLogo Nova clock.