Difference between revisions of "LlSameGroup/ja"

From Second Life Wiki
Jump to navigation Jump to search
m (Undo revision 849162 by Mako Nozaki (Talk))
Line 1: Line 1:
{{LSL Function/ja
{{LSL Function/avatar/ja|agent|sim=*}}{{LSL Function/group/ja}}{{LSL Function/ja
|func=llSameGroup
|func=llSameGroup
|sort=SameGroup
|sort=SameGroup
|func_id=219|func_sleep=0.0|func_energy=10.0
|func_id=219|func_sleep=0.0|func_energy=10.0
|return_type=integer
|return_type=integer
|p1_type=key
|p1_type=key|p1_name=agent
|p1_name=agent
|p1_desc=同じSimでなければなりません
|func_desc
|func_desc
|func_footnote=もしくは、オブジェクトが'''agent'''のアクティブグループに譲渡されている場合も[[TRUE/ja|true]]を返します。
|func_footnote=オブジェクトが '''agent''' のアクティブグループと同じグループに寄贈されている場合も {{LSLG/ja|TRUE}} を返します。
|return_text='''agent'''のアクティブグループと同じ場合は[[TRUE/ja|1]]、その他の場合は[[FALSE/ja|0]]
|return_text='''agent''' のアクティブグループが同じであれば {{LSLG/ja|TRUE}} 、そうでなければ {{LSLG/ja|FALSE}} の真偽値
|spec
|spec
|caveats
|caveats=*オブジェクトにグループ設定がされておらず (つまり "(none)") 、かつ、キーで指定されたアバターがどのグループもアクティブにしていないか、関数が {{LSLG/ja|NULL_KEY}} で呼び出されたかのいずれかであっても、 {{LSLG/ja|TRUE}} が返ります。
|constants
|constants
|examples=<lsl>//Gives inventory object only to agents with the same active group
|examples=<lsl>// 同じグループをアクティブにしているエージェントにのみインベントリオブジェクトを渡します
default
default
{
{
     touch_start(integer total_number)
     touch_start(integer total_number)
     {
     {
         if(llSameGroup(llDetectedKey(0)))//same as llDetectedGroup(0) (with llDetectedGroup, detected does not need to be in the sim)
         integer i;
            llGiveInventory(llDetectedKey(0), llGetInventoryName(INVENTORY_OBJECT,0));
 
        else
        for (i = 0; i < total_number; i++)
            llSay(0, "Wrong active group!");
        {
            if (llSameGroup(llDetectedKey(i))) // llDetectedGroup(i) と同じです。 (llDetectedGroup を使えば、対象が同じ SIM にいる必要はありません)
              llGiveInventory(llDetectedKey(i), llGetInventoryName(INVENTORY_OBJECT, 0));
          else
              llSay(0, "Wrong active group!");
        }
     }
     }
}</lsl>
}</lsl>
|helpers
|helpers
|also_functions={{LSL DefineRow||[[llDetectedGroup/ja|llDetectedGroup]]|{{LSLGC/ja|Detected|detection}}イベントで接続に用いられます}}
|also_functions={{LSL DefineRow||{{LSLG/ja|llDetectedGroup}}|{{LSLGC/ja|Detected|検出系}} イベントと一緒に使用されます}}
|also_tests
|also_tests=
{{LSL DefineRow||[[llSameGroup Test]]}}
|also_events
|also_events
|also_articles
|also_articles

Revision as of 19:07, 8 May 2010

要約

関数: integer llSameGroup( key agent );

agent のアクティブグループが同じであれば TRUE 、そうでなければ FALSE の真偽値を integer で返します。

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

オブジェクトが agent のアクティブグループと同じグループに寄贈されている場合も TRUE を返します。

警告

  • オブジェクトにグループ設定がされておらず (つまり "(none)") 、かつ、キーで指定されたアバターがどのグループもアクティブにしていないか、関数が NULL_KEY で呼び出されたかのいずれかであっても、 TRUE が返ります。

Important Issues

~ All Issues ~ Search JIRA for related Bugs
   Attachments only change/inherit the active group when they're "rezzed"

サンプル

<lsl>// 同じグループをアクティブにしているエージェントにのみインベントリオブジェクトを渡します default {

   touch_start(integer total_number)
   {
       integer i;
       for (i = 0; i < total_number; i++)
       {
           if (llSameGroup(llDetectedKey(i))) // llDetectedGroup(i) と同じです。 (llDetectedGroup を使えば、対象が同じ SIM にいる必要はありません)
             llGiveInventory(llDetectedKey(i), llGetInventoryName(INVENTORY_OBJECT, 0));
          else
             llSay(0, "Wrong active group!");
       }
   }
}</lsl>

注意点

子プリム

子プリムをルートプリムとは異なるグループにすることが可能です。そのようなオブジェクトを作成するには、最初にリンクを解除し、グループを設定し、再リンクします。オブジェクトを rez すると、オブジェクトのグループがリセットされ、ユーザが現在アクティブにしているグループになります。オブジェクトのグループを変更すると、オブジェクト全体のグループも変更されます。これは単に VWR-5044 の副作用か症状である可能性もあります。

関連項目

関数

•  llDetectedGroup 検出系 イベントと一緒に使用されます

特記事項

All Issues

~ Search JIRA for related Issues
   Attachments only change/inherit the active group when they're "rezzed"

テスト

•  llSameGroup Test

Signature

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