fxCreateParticle
Client-side
Server-side
Shared
Manual Review Required
Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.
Creates the given particles of the specified color. Can be useful for creating flares, toxic fumes, reward effects, etc.
OOP Syntax Help! I don't understand this!
- Method: Effect.)(...)
Syntax
bool fxCreateParticle ( string particle, float posX, float posY, float posZ, float dirX, float dirY, float dirZ, float r, float g, float b, float a, [ bool randomizeColors = false, int count = 1, float brightness = 1.0, float size = 0.3, bool randomSizes = false, float life = 1.0 ] )Required Arguments
- particle: The name of the particle to create. See particles list.
- posX: MISSING_PARAM_DESC
- posY: MISSING_PARAM_DESC
- posZ: MISSING_PARAM_DESC
- dirX: MISSING_PARAM_DESC
- dirY: MISSING_PARAM_DESC
- dirZ: MISSING_PARAM_DESC
- r: MISSING_PARAM_DESC
- g: MISSING_PARAM_DESC
- b: MISSING_PARAM_DESC
- a: MISSING_PARAM_DESC
Optional Arguments
NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use.
- randomizeColors (default: false): Specifies whether the color should be fixed (r,g,b) or randomly calculated for each particle based on the given color. This allows to create colorful effects.
- count (default: 1): the number of flying particles to create. Depending on the particle, a very large count may cause the game to lag or freeze (50k+).
- brightness (default: 1.0): the brightness. Ranges from 0 (almost black) to 1 (normal color).
- size (default: 0.3): Particles size. If randomSizes is set then when 0 is specified the minimum size is 0.3.
- randomSizes (default: false): Specifies whether all particles should be the same fixed size or each particle should have a random size.
- life (default: 1.0): the higher this value, the longer the particles survive before they disappear. This parameter may be ignored by some particles.
Returns
- bool: value
Code Examples
shared
This example creates a constant green, toxic fume over the biowell.
setTimer(function() fxCreateParticle("sand", 1271.76392, 295.11682, 20.65631, 0, 0, 1, 56, 191, 52, 255, false, 5, 1, 1, true)end, 750, 0)