# HG changeset patch
# User Wuzzy
# Date 1687357891 0
# Node ID f4c68be644c2cd2a698b078c6bdb2cb4116cd9bd
# Parent dd8b0bad793a4999f6f563419adaeb9bace42f30
LuaLibraryAnimate: Fix wrong example code: onPreciseLocal does not exist
diff -r dd8b0bad793a -r f4c68be644c2 LuaLibraryAnimate.wiki
--- a/LuaLibraryAnimate.wiki Wed Jun 21 14:28:52 2023 +0000
+++ b/LuaLibraryAnimate.wiki Wed Jun 21 14:31:31 2023 +0000
@@ -83,17 +83,11 @@
Once all animations in the animation list have been played, the game returns to the *Not Animating* state and behaves normally again.
-function onPreciseLocal()
- if AnimInProgress() then
- SetAnimSkip(true)
- end
-end
-
=== Skipping ===
You can optionally allow to skip animations so allows players can skip the currently running animation. Skipping is *not* enabled by default. By convention, pressing the Precise key in singleplayer missions should skip the current animation. We recommend to use the following code to enable skipping with the Precise key:
-function onPreciseLocal()
+function onPrecise()
if AnimInProgress() then
SetAnimSkip(true)
end
@@ -177,10 +171,10 @@
==== `SetAnimSkip(bool)` ====
Sets the state of animation skipping to `true` or `false`. If `true`, animations will be skipped. It is useful in case the player is allowed to skip the animation. Note this library will automatically reset the state back to `false` from time to time.
-By convention, a cut scene in a singleplayer mission should be skipped when the player presses the Precise key. In this case, use the `onPreciseLocal` callback for this.
+By convention, a cut scene in a singleplayer mission should be skipped when the player presses the Precise key. In this case, use the `onPrecise` callback for this.
Example:
-function onPreciseLocal()
+function onPrecise()
if AnimInProgress() then
SetAnimSkip(true)
end