Sprite begins doing a specified behavior.
(Opens YouTube in new tab)
The sprite will begin running a behavior over and over again. The sprite will repeatedly run the set of actions contained in the behavior while the project is being run, unless it is instructed to stop. For more information see Adding and Removing Behaviors
.
Examples
Example 1
The fish will begin continuously swimming left and right when the project is run.
Example 2
When the phone is clicked, it will begin jittering.
Syntax
addBehaviorSimple
Parameters
Name | Type | Required? | Description |
---|---|---|---|
behavior | The selected behavior to begin | ||
sprite | The sprite or sprite group beginning the behavior |
Found a bug in the documentation? Let us know at support@code.org.