# SimpleAnimAPI (widget methods): World of Warcraft Forever API

Forever 1.60.1 (70959), Interface 16001, Lua 5.1, from Blizzard's own API documentation. Page: https://wowaddons.gg/forever-api/SimpleAnimAPI

## Functions

### GetDuration

```lua
durationSec = self:GetDuration()
```

Returns:
- `durationSec`: number

### GetElapsed

```lua
elapsedSec = self:GetElapsed()
```

Returns:
- `elapsedSec`: number

### GetEndDelay

```lua
delaySec = self:GetEndDelay()
```

Returns:
- `delaySec`: number

### GetOrder

```lua
order = self:GetOrder()
```

Returns:
- `order`: number

### GetProgress

```lua
progress = self:GetProgress()
```

Returns:
- `progress`: number

### GetRegionParent

```lua
region = self:GetRegionParent()
```

Returns:
- `region`: CScriptObject

### GetScript

```lua
script = self:GetScript(scriptTypeName, [bindingType])
```

Arguments:
- `scriptTypeName`: ScriptTypeName
- `bindingType`: ScriptBindingType, default "Extrinsic"

Returns:
- `script`: LuaFunctionReference

### GetSmoothProgress

```lua
progress = self:GetSmoothProgress()
```

Returns:
- `progress`: number

### GetSmoothing

```lua
weights = self:GetSmoothing()
```

Returns:
- `weights`: SmoothingType

### GetStartDelay

```lua
delaySec = self:GetStartDelay()
```

Returns:
- `delaySec`: number

### GetTarget

```lua
target = self:GetTarget()
```

Returns:
- `target`: CScriptObject

### HasScript

```lua
hasScript = self:HasScript(scriptName)
```

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments:
- `scriptName`: cstring

Returns:
- `hasScript`: bool

### HookScript

```lua
success = self:HookScript(scriptTypeName, script, [bindingType])
```

Arguments:
- `scriptTypeName`: ScriptTypeName
- `script`: LuaFunctionReference
- `bindingType`: ScriptBindingType, default "Extrinsic"

Returns:
- `success`: bool

### IsDelaying

```lua
isDelaying = self:IsDelaying()
```

Returns:
- `isDelaying`: bool

### IsDone

```lua
isDone = self:IsDone()
```

Returns:
- `isDone`: bool

### IsPaused

```lua
isPaused = self:IsPaused()
```

Returns:
- `isPaused`: bool

### IsPlaying

```lua
isPlaying = self:IsPlaying()
```

Returns:
- `isPlaying`: bool

### IsStopped

```lua
isStopped = self:IsStopped()
```

Returns:
- `isStopped`: bool

### Pause

```lua
self:Pause()
```

### Play

```lua
self:Play()
```

### Restart

```lua
self:Restart()
```

### SetChildKey

```lua
success = self:SetChildKey(childKey)
```

Arguments:
- `childKey`: cstring

Returns:
- `success`: bool

### SetDuration

```lua
self:SetDuration(durationSec, [recomputeGroupDuration])
```

Arguments:
- `durationSec`: number
- `recomputeGroupDuration`: bool, default true

### SetEndDelay

```lua
self:SetEndDelay(delaySec, [recomputeGroupDuration])
```

Arguments:
- `delaySec`: number
- `recomputeGroupDuration`: bool, default true

### SetOrder

```lua
self:SetOrder(newOrder)
```

Arguments:
- `newOrder`: number

### SetParent

```lua
self:SetParent(parent, [order])
```

Arguments:
- `parent`: SimpleAnimGroup
- `order`: number, may be nil

### SetPlaying

```lua
self:SetPlaying(play)
```

Arguments:
- `play`: bool

### SetScript

```lua
self:SetScript(scriptTypeName, [script])
```

Arguments:
- `scriptTypeName`: ScriptTypeName
- `script`: LuaFunctionReference, may be nil

### SetSmoothProgress

```lua
self:SetSmoothProgress(durationSec)
```

Arguments:
- `durationSec`: number

### SetSmoothing

```lua
self:SetSmoothing(weights)
```

Arguments:
- `weights`: SmoothingType

### SetStartDelay

```lua
self:SetStartDelay(delaySec, [recomputeGroupDuration])
```

Arguments:
- `delaySec`: number
- `recomputeGroupDuration`: bool, default true

### SetTarget

```lua
success = self:SetTarget(target)
```

Arguments:
- `target`: CScriptObject

Returns:
- `success`: bool

### SetTargetKey

```lua
success = self:SetTargetKey(key)
```

Arguments:
- `key`: cstring

Returns:
- `success`: bool

### SetTargetName

```lua
success = self:SetTargetName(name)
```

Arguments:
- `name`: cstring

Returns:
- `success`: bool

### SetTargetParent

```lua
success = self:SetTargetParent()
```

Returns:
- `success`: bool

### Stop

```lua
self:Stop()
```

---
Make an addon with your 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."
