What it does
LoadObjectChildren writes to a 3D object: it loads rather than reads. It takes fileName (a string), and answers an integer. That is the first of 2 forms.
Syntax
1
LoadObjectChildren(fileName string) → integer2
LoadObjectChildren(objectID integer, fileName string)Parameters
| Name | Type | In forms |
|---|---|---|
| fileName | string | all |
| objectID | integer | 2 |
What each form returns
| 1 | objectChildren = LoadObjectChildren("assets/model.obj") | integer |
| 2 | LoadObjectChildren(1, "assets/model.obj") | nothing |
Example · generated
Form 1, the command hands back the id
objectChildren = LoadObjectChildren("assets/model.obj")DO Sync()LOOPForm 2, you choose the id yourself
LoadObjectChildren(1, "assets/model.obj")DO Sync()LOOPLoadObjectChildren is called and its answer is printed every frame. 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.