Difference between revisions of "LlGetNumberOfPrims/ja"

From Second Life Wiki
Jump to navigation Jump to search
(New page: {{multi-lang}}{{LSL_Function/ja |func_id=275|func_sleep=0.0|func_energy=10.0 |func=llGetNumberOfPrims|sort=GetNumberOfPrims |return_type=integer |func_footnote |func_desc |return_text=ス...)
 
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{multi-lang}}{{LSL_Function/ja
{{LSL_Function/ja
|func_id=275|func_sleep=0.0|func_energy=10.0
|func_id=275|func_sleep=0.0|func_energy=10.0
|func=llGetNumberOfPrims|sort=GetNumberOfPrims
|func=llGetNumberOfPrims|sort=GetNumberOfPrims
Line 5: Line 5:
|func_footnote
|func_footnote
|func_desc
|func_desc
|return_text=スクリプトが備えられたリンクセットのプリムの数
|return_text=スクリプトがついているリンクセットのプリムの数
|spec
|spec
|caveats=*プリムの数はオブジェクトに座っているアバタを総数に含めるものが返されます。
|caveats=*返されるプリムの数には、オブジェクトに座っているアバターの数も含みます。
|constants
|constants
|examples=<lsl>default
|examples=<source lang="lsl2">default
{
{
     state_entry()
     state_entry()
Line 16: Line 16:
         llOwnerSay((string) llGetNumberOfPrims());
         llOwnerSay((string) llGetNumberOfPrims());
     }
     }
}</lsl>
}</source>
|helpers=<lsl>//Returns the number of agents on the object
|helpers=<source lang="lsl2">//オブジェクトに座っているアバターの数を返します
integer GetNumberOfAgents()
integer GetNumberOfAgents()
{//count avatars
{//アバターを数える
     integer a = llGetNumberOfPrims();
     return llGetNumberOfPrims() - llGetObjectPrimCount(llGetKey());
    integer b = a;
    while(llGetAgentSize(llGetLinkKey(a)))
        --a;
    return b - a;
}
}


//Returns the number of prims in the object
//オブジェクトを構成するプリムの数を返します
integer GetNumberOfPrims()
integer GetNumberOfPrims()
{//ignores avatars
{//アバターを無視する
     integer a = llGetNumberOfPrims();
     return llGetObjectPrimCount(llGetKey());
    while(llGetAgentSize(llGetLinkKey(a)))
}</source>
        --a;
    return a;
}</lsl>
|also_functions=
|also_functions=
{{LSL DefineRow||{{LSLG/ja|llGetObjectPrimCount}}|いずれかのオブジェクト内のプリム数を返します。}}
{{LSL DefineRow||{{LSLG/ja|llGetObjectPrimCount}}|オブジェクトを構成するプリムの数を数えます}}
{{LSL DefineRow||{{LSLG/ja|llGetLinkNumber}}|スクリプトが入っているプリムのリンクナンバーを返します。}}
{{LSL DefineRow||{{LSLG/ja|llGetLinkNumber}}|スクリプトが入っているプリムのリンク番号を返します}}
|also_tests
|also_tests
|also_events
|also_events
|also_articles
|also_articles
|notes
|notes
|cat1=Link/ja
|cat1=Link
|cat2
|cat2
|cat3
|cat3
|cat4
|cat4
}}
}}

Latest revision as of 07:02, 25 February 2016

要約

関数: integer llGetNumberOfPrims( );

スクリプトがついているリンクセットのプリムの数を integer で返します。

警告

  • 返されるプリムの数には、オブジェクトに座っているアバターの数も含みます。
All Issues ~ Search JIRA for related Bugs

サンプル

default
{
    state_entry()
    {
        llOwnerSay((string) llGetLinkNumber());
        llOwnerSay((string) llGetNumberOfPrims());
    }
}

便利なスニペット

//オブジェクトに座っているアバターの数を返します
integer GetNumberOfAgents()
{//アバターを数える
    return llGetNumberOfPrims() - llGetObjectPrimCount(llGetKey());
}

//オブジェクトを構成するプリムの数を返します
integer GetNumberOfPrims()
{//アバターを無視する
    return llGetObjectPrimCount(llGetKey());
}

関連項目

関数

•  llGetObjectPrimCount オブジェクトを構成するプリムの数を数えます
•  llGetLinkNumber スクリプトが入っているプリムのリンク番号を返します

特記事項

Search JIRA for related Issues

Signature

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