World of Warcraft Forever API · LuaCurveObjectAPI.md, for your AI
LuaCurveObjectAPI (widget methods)
10 functions, as Blizzard documents them for Forever 1.60.1 (70959).
Making an addon with an AI? Tell it: Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it. It checks every call against this API before you try it in the game, then publishes it here. How it works.
Functions
AddPoint
self:AddPoint(pointX, pointY)
Adds a single point to the curve.
Arguments
pointX | number | |
|---|---|---|
pointY | number |
ClearPoints
self:ClearPoints()
Removes all points from the curve. Evaluating an empty curve always yields a zero value.
Copy
curve = self:Copy()
Returns a new copy of this curve.
Returns
curve | LuaCurveObject |
|---|
Evaluate
y = self:Evaluate(x)
Returns a calculated 'y' value from the configured curve points.
Arguments
x | number |
|---|
Returns
y | number |
|---|
GetPoint
point = self:GetPoint(index)
Returns the vector for an individual point index on the curve.
Arguments
index | luaIndex |
|---|
Returns
point | vector2 may be nil |
|---|
GetPointCount
count = self:GetPointCount()
Returns the total number of points on the curve.
Returns
count | size |
|---|
GetPoints
point = self:GetPoints()
Returns the vectors for all points on the curve.
Returns
point | vector2[] |
|---|
RemovePoint
self:RemovePoint(index)
Removes a single point from the curve. Raises an error if the supplied point index is out of range.
Arguments
index | luaIndex |
|---|
SetPoints
self:SetPoints(point)
Replaces all points on the curve.
Arguments
point | vector2[] |
|---|
SetToDefaults
self:SetToDefaults()
Resets all state on the curve, and clears the secret values flag.