LlGetNumberOfPrims/ja
Jump to navigation
Jump to search
| LSL ポータル | 関数 | イベント | 型 | 演算子 | 定数 | 実行制御 | スクリプトライブラリ | カテゴリ別スクリプトライブラリ | チュートリアル |
要約
関数: integer llGetNumberOfPrims( );警告
- プリムの数はオブジェクトに座っているアバタを総数に含めるものが返されます。
サンプル
<lsl>default {
state_entry()
{
llOwnerSay((string) llGetLinkNumber());
llOwnerSay((string) llGetNumberOfPrims());
}
}</lsl>
便利なスニペット
<lsl>//Returns the number of agents on the object integer GetNumberOfAgents() {//count avatars
integer a = llGetNumberOfPrims();
integer b = a;
while(llGetAgentSize(llGetLinkKey(a)))
--a;
return b - a;
}
//Returns the number of prims in the object integer GetNumberOfPrims() {//ignores avatars
integer a = llGetNumberOfPrims();
while(llGetAgentSize(llGetLinkKey(a)))
--a;
return a;
}</lsl>
関連項目
関数
| • | llGetObjectPrimCount | – | いずれかのオブジェクト内のプリム数を返します。 | |
| • | llGetLinkNumber | – | スクリプトが入っているプリムのリンクナンバーを返します。 |
特記事項
この項目はあなたにとって参考にならない項目ですか?もしかしたらLSL Wikiの関連した項目が参考になるかもしれません。