When Tilted () | |
when tilted ( v):: gdxfor | |
Category | Go Direct Force & Acceleration |
Type | Hat |
Introduced in | 3.0 |
The when tilted () block is a hat block and a Go Direct Force & Acceleration block. Its options are "front", "back", left", "right", and "any". It activates when the Go Direct Force and Acceleration unit is tilted in the specified direction.
Example uses
- Making a sprite move
When tilted (left v):: gdxfor forever change x by [10]
When tilted (right v):: gdxfor forever change x by [-10]
When tilted (front v):: gdxfor forever change y by [10]
When tilted (down v):: gdxfor forever change y by [-10]