# HG changeset patch # User Wuzzy # Date 1525303134 -3600 # Node ID 8d6310a0503352d7f1d0948a3f071ea65fb053f9 # Parent 6695b6e1d39a783fe95e8c1f21f7b65a1be5939d LuaLibraryAnimate: StoppedGear and other funcs diff -r 6695b6e1d39a -r 8d6310a05033 LuaLibraryAnimate.wiki --- a/LuaLibraryAnimate.wiki Thu May 03 00:08:47 2018 +0100 +++ b/LuaLibraryAnimate.wiki Thu May 03 00:18:54 2018 +0100 @@ -25,6 +25,9 @@ === `ShowAnimation()` === Performs the current action in the cinematic and returns `true` if finished, otherwise `false`. It needs to be used in `onGameTick`. Cut-scenes need to be added with `AddAnim(steps)`. +=== `Animate()` === +*UNDOCUMENTED!* + === `AddAnim(steps)` === Adds `steps` to the array of animations, where `steps` is a table with numbers as keys and elements of the following form. Each step is a table having the following keys: `func`, `args`, `swh`. @@ -90,6 +93,12 @@ === `AnimSwitchHog(gear)` === Switches to `gear` and follows it. +=== `AnimGiveState(gear, state)` === +Adds the [GearStates gear state] `state` to `gear`. + +=== `AnimRemoveState(gear, state)` === +Removes the [GearStates gear state] `state` from `gear`. + === `AnimWait(gear, time)` === Increases the wait time by `time`. `gear` is just for compatibility with `ShowAnimation`. @@ -213,3 +222,8 @@ Internally, the input mask you provide is simply AND-ed with the input mask used by the Animate library. Otherwise, this function works lik `SetInputMask`. If you call `SetInputMask` directly, note that it might get quickly overwritten by the Animatel library! + +== Misc. == + +=== `StoppedGear(gear)` === +Returns `true` if the gear is considered to be resting (not moving). (dX and dY are very small) or if the gear does not exist.