Sound: Difference between revisions

From StarLogo Nova Wiki
(updates from Blockument)
(Marked this version for translation)
 
Line 2: Line 2:
<translate>
<translate>


<!--T:2-->
<section begin="image"/>[[File:sound.png|alt=The Sound Block|thumb]]<section end="image"/><p id="tooltip">Returns the sound selected from the dropdown menu.</p>
<section begin="image"/>[[File:sound.png|alt=The Sound Block|thumb]]<section end="image"/><p id="tooltip">Returns the sound selected from the dropdown menu.</p>


==Usage==
==Usage== <!--T:3-->


<!--T:4-->
Returns the selected sound. You can upload or record your own sounds, or select one from a library of pre-loaded sounds.
Returns the selected sound. You can upload or record your own sounds, or select one from a library of pre-loaded sounds.


==Syntax==
==Syntax== <!--T:5-->


<!--T:6-->
Inputs in this block:
Inputs in this block:
#a sound from the dropdown menu
#a sound from the dropdown menu


==Example==
==Example== <!--T:7-->


<!--T:8-->
[[File:sound_example.gif|alt=Sound example gif|thumb]]
[[File:sound_example.gif|alt=Sound example gif|thumb]]
[[File:sound_example.png|alt=Sound example code|thumb]]
[[File:sound_example.png|alt=Sound example code|thumb]]


<!--T:9-->
The image above is from a predator-prey simulation where a dog agent hunts many smaller cat agents. [[Special:MyLanguage/On Collision With Do|On collision with]] a dog, the cat agents will [[Special:MyLanguage/Play Sound|play]] an audio recording of a cat meowing.
The image above is from a predator-prey simulation where a dog agent hunts many smaller cat agents. [[Special:MyLanguage/On Collision With Do|On collision with]] a dog, the cat agents will [[Special:MyLanguage/Play Sound|play]] an audio recording of a cat meowing.


==Related Blocks==
==Related Blocks== <!--T:10-->


<!--T:11-->
*[[Special:MyLanguage/Play Sound|Play Sound]]
*[[Special:MyLanguage/Play Sound|Play Sound]]



Latest revision as of 19:02, 14 August 2023

Other languages:
The Sound Block

Returns the sound selected from the dropdown menu.

Usage

Returns the selected sound. You can upload or record your own sounds, or select one from a library of pre-loaded sounds.

Syntax

Inputs in this block:

  1. a sound from the dropdown menu

Example

The image above is from a predator-prey simulation where a dog agent hunts many smaller cat agents. On collision with a dog, the cat agents will play an audio recording of a cat meowing.

Related Blocks