What it does
Create3DParticles brings a 3DParticles object into being: it is how the rest of the program comes to have one. It takes ID (an integer), x (a float), y (a float) and z (a float), and returns nothing. That is the first of 2 forms.
Syntax
1
Create3DParticles(ID integer, x float, y float, z float)2
Create3DParticles(x float, y float, z float) → integerParameters
| Name | Type | In forms |
|---|---|---|
| ID | integer | 1 |
| x | float | all |
| y | float | all |
| z | float | all |
What each form returns
| 1 | Create3DParticles(1, 100.0, 120.0, 100.0) | nothing |
| 2 | 3DParticles = Create3DParticles(100.0, 120.0, 100.0) | integer |
Example · generated
Form 1, you choose the id yourself
Create3DParticles(1, 100.0, 120.0, 100.0)DO Sync()LOOPForm 2, the command hands back the id
3DParticles = Create3DParticles(100.0, 120.0, 100.0)DO Sync()LOOPCreate3DParticles 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.