Setear Reloj a

From StarLogo Nova Wiki
This page is a translated version of the page Set Clock To and the translation is 42% complete.
Other languages:


Set clock to

set clock to [_] is a bloque de código part of the ambiente drawer.

set clock to [_] is a code block part of the Environment drawer.

Usage

set clock to [_] sets the value of clock to some number. Typically, when you reset the clock, you want to start it at 0.

Sintaxis

The Create Each Do Block

Common Uses

This is commonly used to reset the clock, which is helpful for each time you run a simulation.

Example

Set Clock To example gif
Set Clock To example code

The model above depicts flowers growing with the rainfall over time. The clock is used to determine when thunderstorms start and stop: it will rain between 50 and 100, after which the clock will be reset to 0. In all, there are 50 ticks of rain followed by 50 ticks of no rain.

Nuances

Related Blocks