Script:playanim: Difference between revisions

From Arx Libertatis Wiki
Jump to navigation Jump to search
(Created page with "{{Stub}} This page describes the <code>playanim</code> script command. Usage: playanim none playanim [-123lnp] <animslot> playanim -e[123lnp] <animslot> <command...> Fl...")
 
No edit summary
Line 1: Line 1:
{{Stub}}
{{Stub}}
{{ScriptCommandPage
|description=play an animation
|context=any
|special=
none
|flags=
1 Set the animation for the first animation layer
2 Set the animation for the second animation layer
3 Set the animation for the third animation layer
l Loop the animation
n Do not interpolate from the current animation
p Set an animation on the player instead of the calling entity
e Execute a command after the animation completes
|parameters=
animslot string The animation slot to kill
e?command... command A command to execute after the animation completes
}}


This page describes the <code>playanim</code> script command.
{{Notice|If the animation is cancelled the command specified using the <code>-e</code> flag will still be executed at the time the animation would have finished.}}


Usage:
[[Category:Script delayed execution]]
 
playanim none
playanim [-123lnp] <animslot>
playanim -e[123lnp] <animslot> <command...>
 
Flags:
* <code>-1</code>: Set the animation for the first animation layer
* <code>-2</code>: Set the animation for the second animation layer
* <code>-3</code>: Set the animation for the third animation layer
* <code>-l</code>: Loop the animation
* <code>-n</code>: Do not interpolate from the current animation
* <code>-p</code>: Set an animation on the player instead of the current entity
* <code>-e</code>: Execute a command after the animation completes. If the animation is changed this command is still executed at the time the animation would have completed.
 
Parameters:
{| class="wikitable sortable"
! Parameter
! Type
! Description
|-
| <code><animslot></code>
| {{text}}
| Name of the [[Script:Animation Slot|animation slot]] to use
|-
| <code><command></code>
| <code>code</code>
| One or more script commands to execute after the animation
|}
 
[[Category:Script commands]] [[Category:Script delayed execution]]

Revision as of 17:16, 15 April 2020

This article is a stub - you can help by expanding it. See the Wiki FAQ.

The playanim script command is used to play an animation for an entity.

Usage

playanim [-123lnpe] <animslot> [e?command......]
playanim none

Context: Any Entity

Flags:

 -1: Set the animation for the first animation layer
 -2: Set the animation for the second animation layer
 -3: Set the animation for the third animation layer
 -l: Loop the animation
 -n: Do not interpolate from the current animation
 -p: Set an animation on the player instead of the calling entity
 -e: Execute a command after the animation completes

Parameters:

ParameterTypeDescription
animslot string The animation slot to kill
command... (requires -e) command A command to execute after the animation completes

ℹ️  If the animation is cancelled the command specified using the -e flag will still be executed at the time the animation would have finished.