Difference between revisions of "LlGetAnimationList/ja"

From Second Life Wiki
Jump to navigation Jump to search
m (カテゴリ変更)
 
(3 intermediate revisions by one other user not shown)
Line 4: Line 4:
|func_footnote
|func_footnote
|func_desc
|func_desc
|return_text=keyの'''id'''で指定されたアバターで再生しているアニメーション全て
|return_text='''id''' で表されたアバターが再生しているアニメーションのキーのリスト
|spec
|spec
|caveats=*アニメーション名で再生する仕組みは存在しません。
|caveats=*再生しているアニメーションの名前を取得する内部メカニズムは存在しません。
*標準のアニメーションはスクリプトで開始終了できます。このため、返却されたリストにアバターの状態が正確に反映されているとは限りません。気になるようでしたら、{{LSLG/ja|llGetAgentInfo}} と {{LSLG/ja|llGetAnimation}} を使いましょう。
|constants
|constants
|examples
|examples=
このサンプルはちょっと複雑ですが、この関数にはそんなに多くの応用事例がありません。
<source lang="lsl2">//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();
    }
}</source>
|helpers
|helpers
|also_functions={{LSL DefineRow||[[llGetAgentInfo/ja|llGetAgentInfo]]|アバターの情報を取得します}}
|also_functions={{LSL DefineRow||{{LSLG/ja|llGetAgentInfo}}|アバターの情報を取得します}}
{{LSL DefineRow||[[llGetAnimation/ja|llGetAnimation]]|極めて単純なアバタの情報のstringを取得します}}
{{LSL DefineRow||{{LSLG/ja|llGetAnimation}}|アバターの基本アニメーションの状態を取得します}}
{{LSL DefineRow||[[llStartAnimation/ja|llStartAnimation]]|アバタでアニメーションを開始します}}
{{LSL DefineRow||{{LSLG/ja|llStartAnimation}}|アバターでアニメーションを開始します}}
{{LSL DefineRow||[[llStopAnimation/ja|llStopAnimation]]|アバタで再生しているアニメーションを停止します}}
{{LSL DefineRow||{{LSLG/ja|llStopAnimation}}|アバターで再生しているアニメーションを停止します}}
|also_events
|also_events
|also_tests
|also_tests
|also_articles
|also_articles
|notes
|notes
|cat1=Avatar/ja
|cat1=Avatar
|cat2=Animation/ja
|cat2=Animation
|cat3
|cat3
|cat4
|cat4
}}
}}

Latest revision as of 05:39, 25 February 2016

要約

関数: list llGetAnimationList( key id );

id で表されたアバターが再生しているアニメーションのキーのリストを list で返します。

• key id 同一 地域 にいるアバターの UUID

警告

  • 再生しているアニメーションの名前を取得する内部メカニズムは存在しません。
  • 標準のアニメーションはスクリプトで開始終了できます。このため、返却されたリストにアバターの状態が正確に反映されているとは限りません。気になるようでしたら、llGetAgentInfollGetAnimation を使いましょう。
All Issues ~ Search JIRA for related Bugs

サンプル

このサンプルはちょっと複雑ですが、この関数にはそんなに多くの応用事例がありません。

//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 アバターで再生しているアニメーションを停止します

特記事項

Search JIRA for related Issues

Signature

function list llGetAnimationList( key id );
この翻訳は 原文 と比べて古いですか?間違いがありますか?読みにくいですか?みんなで 修正 していきましょう! (手順はこちら)
この項目はあなたにとって参考にならない項目ですか?もしかしたらLSL Wikiの関連した項目が参考になるかもしれません。