Difference between revisions of "LUA:SetSpeedMultiplier"
(→LUA Functions: SetSpeedMultiplier()) |
(→LUA Functions: SetSpeedMultiplier()) |
||
| Line 30: | Line 30: | ||
Example: Slows target by 75% | Example: Slows target by 75% | ||
| − | function cast(Caster, Target) | + | <pre>function cast(Caster, Target) |
SetSpeedMultiplier(Target, 0.25) | SetSpeedMultiplier(Target, 0.25) | ||
end | end | ||
| + | </pre> | ||
Latest revision as of 18:03, 11 November 2019
LUA Functions: SetSpeedMultiplier()
Sets the speed multiplier for the given target
Syntax
SetSpeedMultiplier(param1, param2)
Parameters
- Required - param1 (Spawn), param2 (float)
- param1 is the spawn who's speed multiplier we are setting
- param2 is the value to set the speed multiplier to
Usage
function cast(Caster, Target)
SetSpeedMultiplier(Target, 0)
end
function remove(Caster, Target)
SetSpeedMultiplier(Target, 1)
end
This spell will root the target and return speed to normal when it fades
Notes
To return speed to normal set the multiplier to 1 if using for a slow spell effect think of it as 0 = stopped 1 = full speed
Example: Slows target by 75%
function cast(Caster, Target)
SetSpeedMultiplier(Target, 0.25)
end