What it does
CreateObjectBox brings a 3D object into being: it is how the rest of the program comes to have one. It takes objectID (an integer), width (a float), height (a float) and length (a float), and returns nothing. That is the first of 2 forms. objectID is the id you are giving a 3D object: every later call names it by that number.
Syntax
1
CreateObjectBox(objectID integer, width float, height float, length float)2
CreateObjectBox(width float, height float, length float) → integerParameters
| Name | Type | In forms |
|---|---|---|
| objectID | integer | 1 |
| width | float | all |
| height | float | all |
| length | float | all |
What each form returns
| 1 | CreateObjectBox(1, 64.0, 64.0, 1.0) | nothing |
| 2 | objectBox = CreateObjectBox(64.0, 64.0, 1.0) | integer |
Example · generated
Form 1, you choose the id yourself
CreateObjectBox(1, 64.0, 64.0, 1.0)DO Sync()LOOPForm 2, the command hands back the id
objectBox = CreateObjectBox(64.0, 64.0, 1.0)DO Sync()LOOPCreateObjectBox is called with values of the types its signature asks for. 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.