fxAddDebris
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 a debris particle effect (e.g. bits that fly off a car when ramming a wall).
OOP Syntax Help! I don't understand this!
- Method: Effect.)(...)
Syntax
bool fxAddDebris ( float posX, float posY, float posZ, [ int colorR = 255, int colorG = 0, int colorB = 0, int colorA = 255, float scale = 1.0, int count = 1 ] )Required Arguments
- posX: MISSING_PARAM_DESC
- posY: MISSING_PARAM_DESC
- posZ: MISSING_PARAM_DESC
Optional Arguments
NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use.
- colorR (default: 255): MISSING_PARAM_DESC
- colorG (default: 0): MISSING_PARAM_DESC
- colorB (default: 0): MISSING_PARAM_DESC
- colorA (default: 255): MISSING_PARAM_DESC
- scale (default: 1.0): the size of the chunks.
- count (default: 1): the number of chunks to create.
Returns
- bool: value
Returns a true if the operation was successful, false otherwise.
Code Examples
shared
This example will create a Debris Effect next to you when typing/debrisin the Chatbox.
addCommandHandler("debris", function() local x, y, z = getElementPosition(localPlayer) local randomColor, randomAmount = math.random(0, 255), math.random(4, 8) fxAddDebris(x, y, z, randomColor, randomColor, randomColor, 255, 1.0, randomAmount)end)