This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
play_animation [2017/04/24 16:40] – justin | play_animation [2020/07/23 11:27] – justin | ||
---|---|---|---|
Line 2: | Line 2: | ||
---- | ---- | ||
- | Plays an animation for the specified entity. Entities include tiles, objects, and characters. | + | Plays an [[animation]] for the specified |
+ | ====Signature: | ||
<code python> | <code python> | ||
play_animation(entity, | play_animation(entity, | ||
Line 9: | Line 10: | ||
^Argument^Description^Type^Required^ | ^Argument^Description^Type^Required^ | ||
- | |entity|Entity for which to play the animation.|[[Entity]]|Yes| | + | |entity|[[Entity]] for which to play the [[animation]].|[[Entity]]|Yes| |
- | |animation_name|Name of the animation to play (as defined in the [[Voxel Editor]]).|[[String]]|Yes| | + | |animation_name|Name of the [[animation]] to play (as defined in the [[Voxel Editor]]).|[[String]]|Yes| |
<WRAP center round info 100%> | <WRAP center round info 100%> | ||
- | You can use [[Play Group Animation]] if you'd like to trigger the same animation for multiple entities that have been grouped together from the Map Editor. | + | You can use [[Play Group Animation]] if you'd like to trigger the same [[animation]] for multiple |
</ | </ | ||
====Example: | ====Example: | ||
- | < | + | < |
play_animation(entity[" | play_animation(entity[" | ||
</ | </ | ||
- | // | + | // |
<WRAP center round tip 100%> | <WRAP center round tip 100%> | ||
- | Use the **Play Animation** function to trigger animations for doors being opened and closed upon player interaction or for special NPC emotes (e.g. waving at the player). | + | Use the **Play Animation** function to trigger |
</ | </ | ||