Difference between revisions of "LlEdgeOfWorld/ja"

From Second Life Wiki
Jump to navigation Jump to search
m (Undo revision 850962 by Mako Nozaki (Talk))
Line 6: Line 6:
|p1_type=vector|p1_name=pos|p2_type=vector|p2_name=dir
|p1_type=vector|p1_name=pos|p2_type=vector|p2_name=dir
|func_footnote
|func_footnote
|func_desc='''dir'''から'''pos'''で判定した境界線が、(近接したシミュレータは含まない)SIMの端か確認します。
|func_desc='''pos''' から伸ばした '''dir''' がぶつかる境界線が、 (隣り合わせの SIM が存在しない) 世界の端であるか確認します。
|return_text={{HoverText|boolean|TRUEあるいはFALSE}}
|return_text={{HoverText|真偽値|TRUE または FALSE}}
|spec
|spec
|caveats
|caveats=* ゼロの方向ベクトル ({{LSLG/ja|ZERO_VECTOR}}) は常に {{LSLG/ja|TRUE}} を返します。
* '''pos''' は地域の中にないといけません。
|constants
|constants
|examples=
|examples=
<lsl>
<lsl>
//--// Tells if there are neighboring sims on touch //--//
//--// 隣合わせの SIM があるか知らせます //--//


default{
default{
Line 19: Line 20:
     vector vPosObject = llGetPos();
     vector vPosObject = llGetPos();
     if (!llEdgeOfWorld( vPosObject, <0.0, 1.0, 0.0> )){
     if (!llEdgeOfWorld( vPosObject, <0.0, 1.0, 0.0> )){
       llOwnerSay( "There is a Sim to the North" );
       llOwnerSay( "北に SIM があります" );
     }
     }
     if (!llEdgeOfWorld( vPosObject, <1.0, 0.0, 0.0> )){
     if (!llEdgeOfWorld( vPosObject, <1.0, 0.0, 0.0> )){
       llOwnerSay( "There is a Sim to the East" );
       llOwnerSay( "東に SIM があります" );
     }
     }
     if (!llEdgeOfWorld( vPosObject, <0.0, -1.0, 0.0> )){
     if (!llEdgeOfWorld( vPosObject, <0.0, -1.0, 0.0> )){
       llOwnerSay( "There is a Sim to the South" );
       llOwnerSay( "南に SIM があります" );
     }
     }
     if (!llEdgeOfWorld( vPosObject, <-1.0, 0.0, 0.0> )){
     if (!llEdgeOfWorld( vPosObject, <-1.0, 0.0, 0.0> )){
       llOwnerSay( "There is a Sim to the West" );
       llOwnerSay( "西に SIM があります" );
     }
     }
   }
   }
Line 34: Line 35:
</lsl>
</lsl>
|helpers
|helpers
|also_constants=
{{LSL DefineRow||{{LSLG/ja|STATUS_DIE_AT_EDGE}}}}
{{LSL DefineRow||{{LSLG/ja|STATUS_RETURN_AT_EDGE}}}}
|also_functions
|also_functions
|also_events
|also_events
Line 42: Line 46:
|negative_index
|negative_index
|cat1=Region
|cat1=Region
|cat2
|cat2=World Edge
|cat3
|cat3
|cat4
|cat4
}}
}}

Revision as of 23:44, 2 May 2010

要約

関数: integer llEdgeOfWorld( vector pos, vector dir );

pos から伸ばした dir がぶつかる境界線が、 (隣り合わせの SIM が存在しない) 世界の端であるか確認します。
真偽値を integer で返します。

• vector pos
• vector dir

警告

  • ゼロの方向ベクトル (ZERO_VECTOR) は常に TRUE を返します。
  • pos は地域の中にないといけません。
All Issues ~ Search JIRA for related Bugs

サンプル

<lsl> //--// 隣合わせの SIM があるか知らせます //--//

default{

 touch_start( integer vIntTouched ){
   vector vPosObject = llGetPos();
   if (!llEdgeOfWorld( vPosObject, <0.0, 1.0, 0.0> )){
     llOwnerSay( "北に SIM があります" );
   }
   if (!llEdgeOfWorld( vPosObject, <1.0, 0.0, 0.0> )){
     llOwnerSay( "東に SIM があります" );
   }
   if (!llEdgeOfWorld( vPosObject, <0.0, -1.0, 0.0> )){
     llOwnerSay( "南に SIM があります" );
   }
   if (!llEdgeOfWorld( vPosObject, <-1.0, 0.0, 0.0> )){
     llOwnerSay( "西に SIM があります" );
   }
 }

}

</lsl>

関連項目

特記事項

Search JIRA for related Issues

Signature

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