DrawParticleLine

Category: Particles
Since engine version: 5.1 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, int a, int b0, int b1, int ydir);

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.
a:
Extra parameter. This is usually the size of the particle in 1/5 pixels.
b0:
Extra starting parameter. This is usually the color modulation at the starting point.
b1:
Extra end parameter. This parameter is interpolated from starting to end point and then applied.
ydir:
Initial vertical velocity.

Example

DrawParticleLine("MagicSpark", 0, 0, GetX(GetCursor())-GetX(), GetY(GetCursor())-GetY(), 20, 100, RGBa(255,50,50,50), RGBa(50,255,50,100), -10);
Creates a line from the calling object to the selected clonk of the first player, color fading from red to blue.
See also: CastParticles, CreateParticle, RGB, RGBa
Sven2, 2002-05