Table of Contents

Function Definition: costume(result_type = "number")

Parameters

NameTypeDescriptionExpected ValuesDefault Value
result_typestringThe type of information required."number" or "name""number"

Description

The function returns its sprite’s current costume number or name.

Example

The example demonstrates the costume change in PictoBlox.

Code

sprite = Sprite('Tobi')

sprite.gotoxy(0, 0)
sprite.setsize(200)
sprite.switchcostume("Tobi")

while True:
  sprite.say(sprite.costume("name"), 1)
  sprite.nextcostume()

Output

Read More
All articles loaded
No more articles to load