SetEffectSpeed: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(Added OOP syntax) |
||
| Line 9: | Line 9: | ||
bool setEffectSpeed ( effect theEffect, float speed ) | bool setEffectSpeed ( effect theEffect, float speed ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[effect]]:setSpeed|speed|getEffectSpeed}} | |||
===Required Arguments=== | ===Required Arguments=== | ||
Revision as of 16:41, 26 November 2014
Syntax
bool setEffectSpeed ( effect theEffect, float speed )
OOP Syntax Help! I don't understand this!
- Method: effect:setSpeed(...)
- Variable: .speed
- Counterpart: getEffectSpeed
Required Arguments
- theEffect: The effect to change the speed of.
- speed: The speed to set.
Returns
Returns true if the effect speed was succesfuly changed, false otherwise.
Example
This example adds command ses that creates effect of a smoke at player's position and sets its speed to 5.
[Lua]
addCommandHandler("ses",
function (cmd)
local x, y, z = getElementPosition(localPlayer)
local effect = createEffect("smoke30lit", x, y, z)
setEffectSpeed(effect, 5)
end)