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