Backdrops and Costumes in Python Mode
Just like in block coding, Python mode in PictoBlox allows you to control backdrops and costumes using code. Instead of dragging blocks, you write Python functions to change how the Stage and sprites look.

Controlling Backdrops with Python
The Stage object in PictoBlox has functions to switch between backdrops. You can change the backdrop by name or switch to the next one in sequence.
Backdrop Functions in Python

Controlling Costumes with Python
Sprites also have functions to switch between their costumes. This is the key to creating animations in Python!

Costume Functions in Python
Costume and backdrop names are case-sensitive in Python. Make sure the name you use in your code matches exactly with the name shown in the Costumes or Backdrops tab!
Example: Changing the Backdrop
# Switch to the Forest backdrop stage.switch_backdrop("Forest") # Print the current backdrop name print(stage.backdrop_name())

.webp&w=3840&q=75)
.webp&w=3840&q=75)
.webp&w=3840&q=75)
.webp&w=3840&q=75)
.webp&w=3840&q=75)