DrawParticleLine

Category: Particles
Since engine version: 1.0 OC

Description

Creates a line of particles between two points. Returns the number of particles created.

Syntax

int DrawParticleLine(string particle, int x0, int y0, int x1, int y1, int prtdist, any xdir, any ydir, any lifetime, proplist prtdef);

Parameters

particle:
Type of particle to be created.
x0:
X coordinate of the starting point. Offset in local calls.
y0:
Y coordinate of the starting point. Offset in local calls.
x1:
X coordinate of the end point. Offset in local calls.
y1:
Y coordinate of the end point. Offset in local calls.
prtdist:
Distance between particles. This may not be applied exactly as particles are always spread evenly over the total distance.
xdir:
Initial horizontal velocity in 1/10th pixels per frame or as a value provider.
ydir:
Initial vertical velocity in 1/10th pixels per frame or as a value provider.
lifetime:
Duration of particle in frames or as a value provider.
prtdef:
Particle definition.

Remark

For more information about the value provider and particle definition parameters, see CreateParticle.

Example

DrawParticleLine("MagicSpark", 0, 0, GetCursor()->GetX()-GetX(), GetCursor()->GetY()-GetY(), 20, 0, 0, 12, {Prototype = Particles_Flash(), Size = 20, R = 50, G = 50, B = 255});
Creates a line from the calling object to the selected clonk of the first player using a blue flash particle.
See also: CastParticles, CreateParticle, RGB, RGBa
Sven2, 2002-05