SetEffectDensity
Jump to navigation
Jump to search
Syntax
bool setEffectDensity(effect theEffect, float density)
Required Arguments
- theEffect: The effect to change the speed of.
- density: The level of density.
Example
This example adds command sed that creates spray effect at the player's position and sets its density to 2.
[Lua] addCommandHandler("sed", function (cmd) local x, y, z = getElementPosition(localPlayer) local effect = createEffect("spraycan", x, y, z) setEffectDensity(effect, 2) end)