|
|
(4 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
− | <div class="toccolours mw-collapsible mw-collapsed" style="background: #f0f0f0; border: 1px dashed darkgrey" width="100%">
| + | #REDIRECT [[Global Command: stopAnimation]] |
− | <b>Command History</b>
| |
− | <div class="mw-collapsible-content">
| |
− | <div style="background:#ebebeb" width="100%">Available since <span style="color:orange">v3.7</span></div>
| |
− | </div></div>
| |
− | | |
− | | |
− | Allows you to stop any active animation; if the animation is not active then nothing happens!
| |
− | | |
− | | |
− | Syntax:
| |
− | <syntaxhighlight>
| |
− | stopAnimation(animation)
| |
− | </syntaxhighlight>
| |
− | | |
− | | |
− | Example 1: basic stop animation method
| |
− | <syntaxhighlight>
| |
− | --[[
| |
− | !important: you must take care when using this method that you don't have multiple instances of animations with the same name otherwise it will not work correctly!
| |
− | --]]
| |
− | | |
− | -- shortened get animation method; !important: see comment above!
| |
− | stopAnimation("Animations[animation_name]")
| |
− | | |
− | | |
− | -- full get animation method; !recommended
| |
− | stopAnimation("Scenes[scene_name].SceneObjects[object_name].ObjectAnimations[animation_name]") | |
− | </syntaxhighlight>
| |
− | | |
− | Example 2: stop animation via a variable
| |
− | <syntaxhighlight>
| |
− | -- you can of course use variables with animations stored in them instead!
| |
− | local anim = getObject("Animations[animation_name]")
| |
− | stopAnimation(anim)
| |
− | </syntaxhighlight>
| |
− | | |
− | | |
− | | |
− | <b><u>Arguments</u></b>
| |
− | | |
− | <b>animation</b>: path <br/>
| |
− | The path to the animation to be stopped! ("path"."object"."animation")
| |
− | | |
− | | |
− | <b><u>Flags</u></b>
| |
− | | |
− | none
| |
− | | |
− | | |
− | <b><u>Return</u></b>
| |
− | | |
− | none
| |
− | {{i18n|StopAnimation}} <br/>
| |
− | {| style="background: #f0f0f0; border: 1px dashed darkgrey" width="100%"
| |
− | |-
| |
− | |<b>Relevant Pages</b>: [[StartAnimation|startAnimation]]
| |
− | |}
| |