OsAvatarPlayAnimation
From OpenSimulator
(Difference between revisions)
Line 1: | Line 1: | ||
− | '''osAvatarPlayAnimation'''(key avatar, string animation) | + | '''osAvatarPlayAnimation'''(key avatar, string animation) |
− | This function causes an animation to be played on the specified avatar. | + | This function causes an animation to be played on the specified avatar. The variable ''animation'' can be either the name of an animation within the task inventory, or it can be the UUID of an animation. Because osAvatarPlayAnimation does not perform any security checks or request animation permissions from the targeted avatar, it has a threat level of High. |
+ | |||
+ | <source lang="lsl"> | ||
+ | //Example Usage: default { | ||
− | |||
− | |||
touch_start(integer num) { | touch_start(integer num) { | ||
− | + | string anim = llGetInventoryName(INVENTORY_ANIMATION, 0); | |
− | + | osAvatarPlayAnimation(llDetectedKey(0), anim); | |
− | + | } | |
− | + | ||
+ | } | ||
+ | </source> | ||
[[Category:OSSL]] | [[Category:OSSL]] |
Revision as of 16:00, 5 June 2011
osAvatarPlayAnimation(key avatar, string animation)
This function causes an animation to be played on the specified avatar. The variable animation can be either the name of an animation within the task inventory, or it can be the UUID of an animation. Because osAvatarPlayAnimation does not perform any security checks or request animation permissions from the targeted avatar, it has a threat level of High.
//Example Usage: default { touch_start(integer num) { string anim = llGetInventoryName(INVENTORY_ANIMATION, 0); osAvatarPlayAnimation(llDetectedKey(0), anim); } }