Set Clock To: Difference between revisions
(Created page with "<section begin=image/> <section end=image/> <section begin="name" />'''<code>set clock to[_]</code>'''<section end="name" /> is a code block part of the Environment drawer. == Usage== <p id="tooltip"><code>stamp [_]</code> causes the agent to draw a circle on the terrain in the agent's current position, with size corresponding to the size of the agent.</p> ===Syntax=== <code>stamp [Textbox: Color]</code> ==Common Uses== This is used to change the col...") |
(duplicate file already uploaded) |
||
(12 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<languages/> | |||
<translate> | |||
<!--T:1--> | |||
<section begin=image/> | <section begin=image/> | ||
[[File:Set clock to.png|alt=Set clock to|thumb]] | |||
<section end=image/><p id="tooltip">Sets the value of clock to some number. Typically, when you reset the clock, you want to start it at 0.</p> | |||
< | <!--T:8--> | ||
<section begin="name" />'''<code>set clock to[_]</code>'''<section end="name" /> is a [[code block]] part of the [[Environment]] drawer. | <section begin="name" />'''<code>set clock to [_]</code>'''<section end="name" /> is a [[code block]] part of the [[Environment]] drawer. | ||
== Usage== | <!--T:2--> | ||
==Usage== | |||
<code>set clock to [_]</code> sets the value of clock to some number. Typically, when you reset the clock, you want to start it at 0. | |||
==Syntax== <!--T:3--> | |||
<code> | <!--T:4--> | ||
[[File:Set Clock To Nums.png|right|alt=Set Clock To Block|thumb]] | |||
<!-- <code>set clock to [Textbox: Number]</code> --> | |||
Inputs: | |||
#a number | |||
<!--T:5--> | |||
==Common Uses== | ==Common Uses== | ||
This is used to | This is commonly used to reset the clock, which is helpful for each time you run a simulation. | ||
==Example== <!--T:9--> | |||
<!--T:10--> | |||
[[File:set_clock_to_example.gif|alt=Set Clock To example gif|thumb]] | |||
[[File:clock_example.png|alt=Set Clock To example code|thumb]] | |||
<!--T:11--> | |||
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== | ==Nuances== <!--T:6--> | ||
<!--T:7--> | |||
==Related Blocks== | ==Related Blocks== | ||
*<code>[[ | *<code>[[Clock|clock]]</code> | ||
[[Category:Environment]] | [[Category:Environment]] | ||
[[Category:Code Block]] | [[Category:Code Block]] | ||
</translate> |
Latest revision as of 15:42, 16 August 2023
Sets the value of clock to some number. Typically, when you reset the clock, you want to start it at 0.
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.
Syntax
Inputs:
- a number
Common Uses
This is commonly used to reset the clock, which is helpful for each time you run a simulation.
Example
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.