Specifies an exact x and y position.
This block has two sockets for number inputs: x position and y position. Any math block can used in these sockets to allow an exact location on the display to be selected.
Examples
The block is used several times to make sure that all of the buttons and cars are lined up and evenly spaced for the start of a race.
Syntax
locationAt
Parameters
Name | Type | Required? | Description |
---|---|---|---|
y position | Any number or math block to represent the y position of the location | ||
x position | Any number or math block to represent the x position of the location |
Tips
- The display area is 400 pixels x 400 pixels and the upper left corner is (0,0).
Found a bug in the documentation? Let us know at support@code.org.