SetEffectDensity: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Client function}} | {{Client function}} | ||
{{New | {{New feature/item|3.0140|1.4|6208| | ||
This function sets the density of a specified [[effect]]. | This function sets the density of a specified [[effect]]. | ||
}} | }} |
Revision as of 09:58, 7 July 2014
This function sets the density of a specified effect.
Syntax
bool setEffectDensity ( effect theEffect, float density )
Required Arguments
- theEffect: The effect to change the speed of.
- density: The level of density.
Returns
Returns true if the density was succesfully changed, false otherwise.
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)