FxAddSparks

From Multi Theft Auto: Wiki
Revision as of 20:30, 25 June 2008 by Arc (talk | contribs) (New page: __NOTOC__ {{Client function}} Creates a number sparks along a line. ==Syntax== <syntaxhighlight lang="lua"> bool fxAddSparks ( float posX, float posY, float posZ, float dirX, float dirY, float dirZ, [flo...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Creates a number sparks along a line.

Syntax

bool fxAddSparks ( float posX, float posY, float posZ, float dirX, float dirY, float dirZ, [float force=1, int count=1, float acrossLineX=0, float acrossLineY=0, float acrossLineZ=0, bool blur=false, float spread=1, float life=1] )

Required Arguments

  • posX, posY, posZ: the world coordinates where the sparks originate.
  • dirX, dirY, dirZ: a direction vector indicating where the sparks fly to. The longer this vector is, the faster the sparks fly.

Optional Arguments

  • force: speed factor: the higher this value, the faster and further the sparks fly.
  • count: the number of effects to create.
  • acrossLineX, acrossLineY, acrossLineZ: a vector starting at the pos coordinates. If specified, the sparks will be created along a line going from pos to pos - acrossLine. If not specified, all sparks originate from the point at pos.
  • blur: if false, creates standard bullet impact-like sparks. If true, adds motion blur to the sparks.
  • spread: determines how strongly the particles deviate from each other. With low values the particles will stay quite close together, high values will make them fly in all directions. Also affects their speed.
  • life: the higher this value, the longer the sparks survive before they disappear.

See Also