fxAddDebris
Client-side
Server-side
Shared
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.addDebris(...)
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: The world X coordinate where the effect originates.
- posY: The world Y coordinate where the effect originates.
- posZ: The world Z coordinate where the effect originates.
Optional Arguments
NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use.
- colorR (default: 255): The color (Red) of the debris effect.
- colorG (default: 0): The color (Green) of the debris effect.
- colorB (default: 0): The color (Blue) of the debris effect.
- colorA (default: 255): The color (Alpha) of the debris effect.
- scale (default: 1.0): The size of the chunks.
- count (default: 1): The number of chunks to create.
Returns
- bool: result
Returns a true if the operation was successful, false otherwise.
Code Examples
client
This example will create a Debris Effect next to you when typing /debris in 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)
