CreateParticles

Family: Particles · 2 forms

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) → integer

Parameters

NameTypeIn forms
IDinteger1
xfloatall
yfloatall

What each form returns

1CreateParticles(1, 100.0, 120.0)nothing
2particles = CreateParticles(100.0, 120.0)integer

Example · generated

Form 1, you choose the id yourself

CreateParticles(1, 100.0, 120.0)DO  Sync()LOOP

Form 2, the command hands back the id

particles = CreateParticles(100.0, 120.0)DO  Sync()LOOP

CreateParticles 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.

38 commands in Particles