Difference between revisions of "LUA:SetSpeedMultiplier"

(Created page with "= LUA Functions: SetSpeedMultiplier() = Sets the speed multiplier for the given target ==== Syntax ==== SetSpeedMultiplier(param1, param2) ==== Parameters ==== ; Required - ''...")
 
(LUA Functions: SetSpeedMultiplier())
 
(One intermediate revision by the same user not shown)
Line 27: Line 27:
 
== Notes ==
 
== Notes ==
 
To return speed to normal set the multiplier to 1
 
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%
 +
<pre>function cast(Caster, Target)
 +
    SetSpeedMultiplier(Target, 0.25)
 +
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