Scratch for Java

Stage::goLayersForwards()

Moves the specified sprite forward by a given number of layers in the sprite list. If the resulting position is out of bounds, it will be adjusted to the nearest valid position.

Syntax

Java

.goLayersForwards(sprite, number)

Parameters

Name Data Type Description
sprite Sprite the sprite to be moved forward in the layer order
number int the number of layers to move the sprite forward

Return

void

goLayersForwards()