Particles
Inherits from DynamicInstance
Particles are objects, that spawn and render particles in the world.
Summary
Properties
ImageID:stringImageType:ImageTypeColor:ColorRangeColorMode:ParticleColorModeLifetime:NumberRangeSizeOverLifetime:NumberRangeSpeed:NumberRangeEmissionRate:intMaxParticles:intGravity:floatSimulationSpace:ParticleSimulationSpaceStartRotation:NumberRangeAngularVelocity:NumberRangeAutoplay:boolLoop:boolDuration:floatShape:ParticleShapeShapeRadius:floatShapeAngle:floatShapeScale:floatIsPlaying:boolRead OnlyIsPaused:boolRead OnlyIsStopped:boolRead OnlyParticleCount:intRead OnlyTime:floatRead OnlyTotalTime:floatRead Only
Methods
Properties
ImageID
Particles.ImageID: string
Specifies the image asset ID that the particles will use.
ImageType
Particles.ImageType: ImageType
The image type of the specified image id.
Color
Particles.Color: ColorRange
The color of the particles, over the lifetime of the particle.
ColorMode
Particles.ColorMode: ParticleColorMode
The color mode of the particles.
Lifetime
Particles.Lifetime: NumberRange
Specifies the range of the lifetime of the particles. A random value in this range will be chosen as particle lifetime.
SizeOverLifetime
Particles.SizeOverLifetime: NumberRange
The size of the particles, over the lifetime of the particle.
Speed
Particles.Speed: NumberRange
The speed of the particles. A random value in this range will be chosen. The particle moves in its direction at this speed.
EmissionRate
Particles.EmissionRate: int
The amount of particles spawned in every second
MaxParticles
Particles.MaxParticles: int
The maximum amount of particles that can exist at any time.
Gravity
Particles.Gravity: float
If not set to 0, this will apply a gravitational force to the particles.
SimulationSpace
Particles.SimulationSpace: ParticleSimulationSpace
Whether the particles are simulated in world or local space.
StartRotation
Particles.StartRotation: NumberRange
The rotation the particles will start in. A random value in this range will be chosen.
AngularVelocity
Particles.AngularVelocity: NumberRange
The angular velocity (= the rate of rotation) of the particles. A random value in this range will be chosen.
Autoplay
Particles.Autoplay: bool
Whether these particles should automatically start emitting or be manually scripted.
Loop
Particles.Loop: bool
Whether these particles should loop indefinitely, or stop after the specified duration.
Duration
Particles.Duration: float
The duration of how long the particles object keeps emitting particles.
Shape
Particles.Shape: ParticleShape
The shape of the particles.
ShapeRadius
Particles.ShapeRadius: float
The radius of the specified shape.
ShapeAngle
Particles.ShapeAngle: float
The angle of the specified shape.
ShapeScale
Particles.ShapeScale: float
The scale of the specified shape.
IsPlaying
Particles.IsPlaying: bool
Whether this particles object is currently emitting particles.
IsPaused
Particles.IsPaused: bool
Whether this particles object is currently paused.
IsStopped
Particles.IsStopped: bool
Whether this particles object is currently stopped.
ParticleCount
Particles.ParticleCount: int
The count of particles currently emitted and still alive.
Time
Particles.Time: float
The current time in the duration timespan.
TotalTime
Particles.TotalTime: float
The total time the particles object has been emitting particles for.
Methods
Play
Particles:Play()
Starts the emission of the particles from this object.
Pause
Particles:Pause()
Pauses the emission of the particles from this object.
Stop
Particles:Stop()
Stops the emission of the particles from this object.
Clear
Particles:Clear()
Clears all currently emitted particles.
Emit
Particles:Emit(count: int)
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
count | int | - |
Emits the specified amount of particles immediately.
Simulate
Particles:Simulate(time: float)
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
time | float | - |
Simulates the particles object for the specified time. This includes all physics, emission, etc.