Category:Actions

Changes the property of a sprite or group of sprites by a given value.

Sprites have several properties that allow them to be changed and customized. These properties can be changed throughout a project.

  • Size - the size of the sprite by percentage. 100 is the full, default size. Any number less than 100 makes the sprite smaller, and any number larger will make the sprite bigger.
  • Rotation - the direction or rotation the sprite is facing in degrees, 0 to 359.
  • x position - the x position of the center of the sprite. To remain on the canvas, this should be a number between 0 and 400. “0” is the normal default direction.
  • y position - the y position of the center of the sprite. To remain on the canvas, this should be a number between 0 and 400.
  • Movement direction - the direction the sprite travels with the move forward block. “0” is the default value and moves the sprite right (east). “180” moves the sprite left (west).

Using this block will add the specified value to the selected property.

Parameters

NameDescription
sprite The sprite or sprite group whose property is being changed
property size, rotation, x position, y position, or movement direction
value The value to add to the property being set

Found a bug in the documentation? Let us know at documentation@code.org