Difference between revisions of "LlDetectedGroup/ja"

From Second Life Wiki
Jump to navigation Jump to search
m (カテゴリ変更)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{LSL Function/group/ja}}{{LSL_Function/detected/ja|number|group}}
{{LSL Function/group/ja}}{{LSL_Function/detected/ja|number|group|error={{LSLG/ja|FALSE}}}}{{LSL_Function/ja
{{LSL_Function/ja
|func_id=39|func_sleep=0.0|func_energy=10.0
|func_id=39|func_sleep=0.0|func_energy=10.0
|sort=DetectedGroup|func=llDetectedGroup
|sort=DetectedGroup|func=llDetectedGroup
|return_type=integer
|return_type=integer
|p1_type=integer|p1_name=number
|p1_type=integer|p1_name=number
|func_footnote='''number'''が検出数の範囲を超えているか、{{LSLGC/ja|Detected|検出}}のイベントがこの特性をサポートしていないとき{{LSLG|FALSE/ja|FALSE}}が返ります。
|func_footnote='''number''' が範囲外の場合、 {{LSLG/ja|FALSE}} を返します。
|func_desc
|func_desc
|return_text={{LSLGC/ja|Detected|検出}}されたオブジェクトまたはアバターが、スクリプトの入ったプリムと同じグループに設定されているか調べて{{HoverText|ブーリアン型|TRUE または FALSE}}
|return_text={{LSLGC/ja|Detected|検出された}} オブジェクトやアバターがスクリプトが設定されているプリムと同じグループに所属するか否かを示す {{HoverText|boolean/ja|TRUE または FALSE|真偽値}} 
|spec
|spec
|caveats
|caveats
|constants
|constants
|examples=<lsl>//Gives inventory only to agents with the same active group
|examples=<source lang="lsl2">//同じグループの人にだけインベントリのアイテムをさしあげます
default
default
{
{
Line 19: Line 18:
         do
         do
         {
         {
             if (llDetectedGroup(number)) //same as llSameGroup(llDetectedKey(0)) (with llSameGroup, detected must be in the sim)
             if (llDetectedGroup(number)) //llSameGroup(llDetectedKey(number)) と同じです
                                        //(llSameGroup では、検出対象が同じ SIM の中になければなりません)
                 llGiveInventory(llDetectedKey(number), llGetInventoryName(INVENTORY_OBJECT,0));
                 llGiveInventory(llDetectedKey(number), llGetInventoryName(INVENTORY_OBJECT,0));
             else
             else
Line 25: Line 25:
         }while(total_number > ++number);
         }while(total_number > ++number);
     }
     }
}</lsl>
}</source>
|helpers
|helpers
|also_functions=
|also_functions=
{{LSL DefineRow||[[llSameGroup/ja|llSameGroup]]|}}
{{LSL DefineRow||{{LSLG/ja|llSameGroup}}|}}
|also_events
|also_events
|also_articles
|also_articles
|notes
|notes
|permission
|permission
|cat1=Group/ja
|cat1=Group
|cat2
|cat2
|cat3
|cat3
|cat4
|cat4
}}
}}

Latest revision as of 06:46, 25 February 2016

要約

関数: integer llDetectedGroup( integer number );

検出された オブジェクトやアバターがスクリプトが設定されているプリムと同じグループに所属するか否かを示す 真偽値 を integer で返します。

• integer number 探知情報の番号

number には 負のインデックス を使用できません。 number が範囲外の場合、 FALSE を返します。

仕様

llDetected* 関数はどこでも使用可能ですが、探知イベント (collision, collision_start, collision_end, sensor, touch, touch_start, touch_end) の中、または探知イベントで呼ばれた関数の中で呼び出されたときのみ使用可能な値を返します。

警告

  • number が正常なインデックス範囲を外れていても、この関数は FALSE を返し、スクリプトはエラー表示を出さずに処理を続けます。
  • llDetected* 関数が有効になるイベントは、常に少なくとも 1 個以上の探知結果を返します。
    • 何も探知されなかった場合、探知イベントは発生しません。[1]
    • 探知イベントの探知個数を表す引数は、最初は決して 1 未満にはなりません。[2]

Important Issues

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

サンプル

//同じグループの人にだけインベントリのアイテムをさしあげます
default
{
    touch_start(integer total_number)
    {
        integer number = 0;
        do
        {
            if (llDetectedGroup(number)) //llSameGroup(llDetectedKey(number)) と同じです
                                         //(llSameGroup では、検出対象が同じ SIM の中になければなりません)
                llGiveInventory(llDetectedKey(number), llGetInventoryName(INVENTORY_OBJECT,0));
            else
                llSay(0, "Wrong active group!");
        }while(total_number > ++number);
    }
}

注意点

子プリム

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

関連項目

関数

•  llSameGroup

記事

•  検出

特記事項

All Issues

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

脚注

  1. ^ 例外は no_sensor ですが、ここでは llDetected* 関数は有効にはなりません。
  2. ^ 他のあらゆるイベント引数と同じように、ユーザは初期値を上書きすることができます。

Signature

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