Template:Needs Translation/
函数名
|
Function: string llGetAnimationOverride( string anim_state )
|
参数:string anim_state–动画状态
|
返回值:返回一个字符串,它是用于指定动画状态(anim_state)的动画名称。
|
注意事项
|
权限
- 不要依赖于权限的自动授予状态。始终使用run_time_permissions事件。
- 如果脚本缺少权限PERMISSION_OVERRIDE_ANIMATIONS和PERMISSION_TRIGGER_ANIMATION,脚本将在DEBUG_CHANNEL上发出错误提示,操作失败(但是脚本继续运行)。
- 一旦PERMISSION_OVERRIDE_ANIMATIONS权限被授予,除了在脚本内部(例如,使用一个新的llRequestPermissions调用)或者脚本被重置,可能没有办法撤销它。此外,即使脚本失去权限(或被解除ezzed),它也不会重置/恢复覆盖动画。
- 对于查看者3.6.7及以上:如果对象没有附加到权限授予者但在同一区域,那么Me>Movement>Stop Animating Me将撤销PERMISSION_TRIGGER_ANIMATION和PERMISSION_OVERRIDE_ANIMATIONS(其他权限将保留)。在这种情况下,重写被重置。
- 一旦PERMISSION_TRIGGER_ANIMATION权限被授予,除了在脚本内部(例如,使用一个新的llRequestPermissions调用)或者脚本被重置,可能没有办法撤销它。
- 对于查看者3.6.7及以上:如果对象没有附加到权限授予者但在同一区域,那么Me>Movement>Stop Animating Me将撤销PERMISSION_TRIGGER_ANIMATION和PERMISSION_OVERRIDE_ANIMATIONS(其他权限将保留)。
|
示例
|
示例1
// llGetAnimationOverride Example
// A Script to check the animation Stats on
// all available overridable animations.
// By Kanashio Koroshi and Pedro Oval
default
{
state_entry()
{
llRequestPermissions(llGetOwner(),
PERMISSION_OVERRIDE_ANIMATIONS);
}
run_time_permissions(integer permissions)
{
if (permissions & PERMISSION_OVERRIDE_ANIMATIONS)
{
llOwnerSay("Listing Overridden Animations");
llOwnerSay("Crouching: " + llGetAnimationOverride("Crouching"));
llOwnerSay("CrouchWalking: " + llGetAnimationOverride("CrouchWalking"));
llOwnerSay("Falling Down: " + llGetAnimationOverride("Falling Down"));
llOwnerSay("Flying: " + llGetAnimationOverride("Flying"));
llOwnerSay("FlyingSlow: " + llGetAnimationOverride("FlyingSlow"));
llOwnerSay("Hovering: " + llGetAnimationOverride("Hovering"));
llOwnerSay("Hovering Down: " + llGetAnimationOverride("Hovering Down"));
llOwnerSay("Hovering Up: " + llGetAnimationOverride("Hovering Up"));
llOwnerSay("Jumping: " + llGetAnimationOverride("Jumping"));
llOwnerSay("Landing: " + llGetAnimationOverride("Landing"));
llOwnerSay("PreJumping: " + llGetAnimationOverride("PreJumping"));
llOwnerSay("Running: " + llGetAnimationOverride("Running"));
llOwnerSay("Sitting: " + llGetAnimationOverride("Sitting"));
llOwnerSay("Sitting on Ground: " + llGetAnimationOverride("Sitting on Ground"));
llOwnerSay("Standing: " + llGetAnimationOverride("Standing"));
llOwnerSay("Standing Up: " + llGetAnimationOverride("Standing Up"));
llOwnerSay("Striding: " + llGetAnimationOverride("Striding"));
llOwnerSay("Soft Landing: " + llGetAnimationOverride("Soft Landing"));
llOwnerSay("Taking Off: " + llGetAnimationOverride("Taking Off"));
llOwnerSay("Turning Left: " + llGetAnimationOverride("Turning Left"));
llOwnerSay("Turning Right: " + llGetAnimationOverride("Turning Right"));
llOwnerSay("Walking: " + llGetAnimationOverride("Walking"));
}
}
}
|