What it does
SpritePixelFromY takes iSpriteIndex (an integer) and y (a float), and answers an integer. iSpriteIndex is the id of a Sprite object, the one CreateSprite returned: it is how the call knows what to act on.
Syntax
SpritePixelFromY(iSpriteIndex integer, y float) → integerParameters
| Name | Type |
|---|---|
| iSpriteIndex | integer |
| y | float |
Every form returns
integer
Example · generated
image = LoadImage("assets/sprite.png", 1)sprite = CreateSprite(image)DO Print(SpritePixelFromY(sprite, 120.0)) Sync()LOOPLoadImage and CreateSprite are there to give the call something to act on; SpritePixelFromY is the line that matters. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.