While Toggled: Difference between revisions

From StarLogo Nova Wiki
No edit summary
(add tooltip text)
Line 5: Line 5:
<section begin="image"/>
<section begin="image"/>
[[File:While toggled.png|alt=While toggled|thumb]]
[[File:While toggled.png|alt=While toggled|thumb]]
<section end="image"/>
<section end="image"/><p id="tooltip">Executes commands (in a forever loop) when the toggle button widget is turned on. When the toggle button widget is turned off, the commands in this block don’t run. Widgets can be created using the Edit Widgets feature.</p>
 
<section begin="name" />{{Block|while [▼] toggled}}<section end="name" /> is a code block from the [[Interface]] drawer.
<section begin="name" />{{Block|while [▼] toggled}}<section end="name" /> is a code block from the [[Interface]] drawer.


<!--T:2-->
<!--T:2-->
==Usage==
==Usage==
<p id="tooltip">{{Block|while [▼] toggled}} executes commands repeatedly while the toggle button widget is turned on. When the toggle button widget is turned off, the commands in this block don’t run. Widgets can be created using the [[Edit Widgets]] feature.</p>
{{Block|while [▼] toggled}} executes commands repeatedly while the toggle button widget is turned on. When the toggle button widget is turned off, the commands in this block don’t run. Widgets can be created using the [[Edit Widgets]] feature.


<!--T:3-->
<!--T:3-->

Revision as of 15:01, 8 August 2023

Other languages:


While toggled

Executes commands (in a forever loop) when the toggle button widget is turned on. When the toggle button widget is turned off, the commands in this block don’t run. Widgets can be created using the Edit Widgets feature.

while [▼] toggled is a code block from the Interface drawer.

Usage

while [▼] toggled executes commands repeatedly while the toggle button widget is turned on. When the toggle button widget is turned off, the commands in this block don’t run. Widgets can be created using the Edit Widgets feature.

Syntax

While Toggled Block

Input:

  1. Select the desired toggle-button widget from the drop down menu.

Nuances

Use this block when you want a stack of code to be continuously executed.

Related Blocks