Skip to content

Looks functions

Free functions you can call directly in sprite code.

changeEffect(effect: string, amount: number): void

Change a graphic effect by an amount.

Delegates to Sprite.effects

changeSize(amount: number): void

Change this sprite’s size by an amount.

Delegates to Sprite.size

clearEffects(): void

Remove all graphic effects from this sprite.

Delegates to Sprite.effects

getCostume(): string

Get the name of the current costume.

Delegates to Sprite.costume

getCostumeNumber(): number

Get the current costume number.

Delegates to Sprite.costumeNumber

getCostumes(): string[]

Get the names of all costumes.

Delegates to Sprite.costumes

getSize(): number

Get this sprite’s current size percentage.

Delegates to Sprite.size

getVisible(): boolean

Get whether this sprite is currently visible.

Delegates to Sprite.visible

hide(): void

Hide this sprite.

Delegates to Sprite.visible

nextCostume(): void

Switch to the next costume.

Delegates to Sprite.costumeNumber

prevCostume(): void

Switch to the previous costume.

Delegates to Sprite.costumeNumber

say(message: string): void

Show a speech bubble with the given message.

Delegates to Sprite.say

Used by

sayAndWait(message: string, seconds: number): void

Show a speech bubble for a number of seconds, then continue.

Pauses the script (a generator). In sprite code the free-function wrapper awaits it for you.

Delegates to Sprite.sayAndWait

setCostume(costume: string | number): void

Switch to a costume by name or number.

Delegates to Sprite.costume

setCostumeNumber(number: number): void

Set the current costume number.

Delegates to Sprite.costumeNumber

setEffect(effect: string, value: number): void

Set a graphic effect to a value.

Delegates to Sprite.effects

setSize(percent: number): void

Set this sprite’s size as a percentage.

Delegates to Sprite.size

show(): void

Make this sprite visible.

Delegates to Sprite.visible

think(message: string): void

Show a thought bubble with the given message.

Delegates to Sprite.think

thinkAndWait(message: string, seconds: number): void

Show a thought bubble for a number of seconds, then continue.

Pauses the script (a generator). In sprite code the free-function wrapper awaits it for you.

Delegates to Sprite.thinkAndWait