What it does
CreateObjectCylinder brings a 3D object into being: it is how the rest of the program comes to have one. It takes objectID (an integer), height (a float), diameter (a float) and segments (an integer), 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
CreateObjectCylinder(objectID integer, height float, diameter float, segments integer)2
CreateObjectCylinder(height float, diameter float, segments integer) → integerParameters
| Name | Type | In forms |
|---|---|---|
| objectID | integer | 1 |
| height | float | all |
| diameter | float | all |
| segments | integer | all |
What each form returns
| 1 | CreateObjectCylinder(1, 64.0, 1.0, 1) | nothing |
| 2 | objectCylinder = CreateObjectCylinder(64.0, 1.0, 1) | integer |
Example · generated
Form 1, you choose the id yourself
CreateObjectCylinder(1, 64.0, 1.0, 1)DO Sync()LOOPForm 2, the command hands back the id
objectCylinder = CreateObjectCylinder(64.0, 1.0, 1)DO Sync()LOOPCreateObjectCylinder 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.