Sprite stops doing all its behaviors.
If a sprite has multiple behaviors, they can all be stopped at once using this block. For more information see Adding and Removing Behaviors
.
Examples
The sprite has three behaviors: spinning, swimming, and growing. When it is clicked, all three behaviors will stop.
Syntax
removeAllBehaviors
Parameters
Name | Type | Required? | Description |
---|---|---|---|
sprite | The sprite or sprite group, whose behaviors are being stopped |
Tips
- Connect this block to events like
sprite clicked
. Code is executed quickly in Sprite Lab. If you tell a sprite to begin a behavior and then tell it to stop in the same sequence of code, there is not enough time to see the behavior in action. - This block can be used along with
set sprite property
,jump to
andchange color
to restore a sprite to its initial state, which can be useful in games and simulations that can be “reset”.
Found a bug in the documentation? Let us know at support@code.org.