LlGetNumberOfPrims/ja

From Second Life Wiki
Jump to navigation Jump to search

要約

関数: integer llGetNumberOfPrims( );

スクリプトが備えられたリンクセットのプリムの数を integer で返します。

警告

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

サンプル

<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 スクリプトが入っているプリムのリンクナンバーを返します。

特記事項

Search JIRA for related Issues

Signature

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