getEffectSpeed
Client-side
Server-side
Shared
Pair: setEffectSpeed
This function gets the speed of a specified effect.
OOP Syntax Help! I don't understand this!
- Method:effect:getSpeed(...)
- Variable: .speed
Syntax
float|false getEffectSpeed ( effect theEffect )Required Arguments
- theEffect: The effect to get the speed of.
Returns
- float|false: effect speed
Returns float containing the effect's speed, false if invalid arguments were specified.
Code Examples
client
This example adds command ges that creates crate explosion effect at the player's position and outputs its speed to the chatbox.
addCommandHandler("ges", function(cmd) local x, y, z = getElementPosition(localPlayer) local effect = createEffect("explosion_crate", x, y, z) outputChatBox("The speed: " .. tostring(getEffectSpeed(effect)))end)