What it does
SpriteShapeChain sets ShapeChain on a Sprite object. It takes iSpriteIndex (an integer), numPoints (an integer), index (an integer), loop (an integer), x (a float), y (a float) and shapeID (an integer), and returns nothing. iSpriteIndex is the id of a Sprite object, the one CreateSprite returned: it is how the call knows what to act on.
Syntax
SpriteShapeChain(iSpriteIndex integer, numPoints integer, index integer, loop integer, x float, y float, shapeID integer)Parameters
| Name | Type |
|---|---|
| iSpriteIndex | integer |
| numPoints | integer |
| index | integer |
| loop | integer |
| x | float |
| y | float |
| shapeID | integer |
Every form returns
nothing
Example · generated
image = LoadImage("assets/sprite.png", 1)sprite = CreateSprite(image)object = LoadObject("assets/media.obj")shape = LoadObjectShape(object, "assets/media.obj")SpriteShapeChain(sprite, 10, 1, 1, 100.0, 120.0, shape)DO Sync()LOOPLoadImage, CreateSprite, LoadObject and LoadObjectShape are there to give the call something to act on; SpriteShapeChain 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.