“LlGetAnimationList”的版本间的差异
(创建页面,内容为“{{LSL Header|ml=*}}{{LSLC|Keywords}}{{LSLC|Flow Control}}{{LSLC|}} {{函数详情 |函数名 = Function: list llGetAnimationList( key avatar ) |参数= 参数:ke…”) |
|||
| 第4行: | 第4行: | ||
{{函数详情 | {{函数详情 | ||
|函数名 = Function: list llGetAnimationList( key avatar ) | |函数名 = Function: list llGetAnimationList( key avatar ) | ||
| − | |参数= 参数:key | + | |参数= 参数:key avatar–在同一区域化身的UUID |
|返回值= 返回值:返回一个播放动画的按键列表。 | |返回值= 返回值:返回一个播放动画的按键列表。 | ||
2021年8月29日 (日) 02:40的最新版本
| 首页 | 函数 | 事件 | 类型 | 操作符 | 常数 | Flow Control | Script Library | Categorized Library | Tutorials |
| 函数名 |
|---|
| Function: list llGetAnimationList( key avatar ) |
| 参数:key avatar–在同一区域化身的UUID |
| 返回值:返回一个播放动画的按键列表。 |
| 注意事项 |
|---|
注意事项
|
| 示例 |
|---|
这个示例有点复杂,但是用于这个函数的应用程序并不多。
//Simple Animation Override for Walk
key old_anim = "6ed24bd8-91aa-4b12-ccc7-c97c857ab4e0";
string new_anim="yoga_float";
integer status;
list check;
key owner;
default
{
state_entry()
{
owner = llGetOwner();
llRequestPermissions(owner, PERMISSION_TRIGGER_ANIMATION);
check = [old_anim];
}
run_time_permissions(integer p)
{
if(p & PERMISSION_TRIGGER_ANIMATION)
{
llSetTimerEvent(0.2);
}
}
timer()
{
if(llGetAgentInfo(owner) & AGENT_WALKING)
{
list anims = llGetAnimationList(owner);
if(~llListFindList(anims, check))
{
status = 1;
llStartAnimation(new_anim);
llStopAnimation(old_anim);
}
}
else if(status)
{
llStopAnimation(new_anim);
status = 0;
}
}
on_rez(integer p)
{
llResetScript();
}
}
|
| 相关函数 |
|---|
| llGetAgentInfo -获取头像信息
llGetAnimation -获取角色的基本动画状态 llStartAnimation -在一个化身上开始一个动画 llStopAnimation -停止在角色上播放的动画 |
| 相关事件 |
|---|
| 无 |