Difference between revisions of "LlWanderWithin/ja"

From Second Life Wiki
Jump to navigation Jump to search
m
m
 
Line 1: Line 1:
{{LSL_Function/ja
{{LSL_Function/ja
|func=llWanderWithin
|func=llWanderWithin
|func_desc=Sets a character to wander about a central spot within a specified radius.
|func_desc=キャラクターを指定された半径内の中心点を中心に徘徊させます。
|p1_type=vector|p1_name=origin|p1_desc=Central point to wander about
|p1_type=vector|p1_name=origin|p1_desc=徘徊する中心点
|p2_type=vector|p2_name=dist|p2_desc=Sets how far the character may wander from {{LSLP|origin}}, along each world-aligned axis|p2_hover=Sets how far the character may wander from 'origin', along each world-aligned axis
|p2_type=vector|p2_name=dist|p2_desc=キャラクターが{{LSLP|origin}}から各ワールドに沿った軸方向に徘徊できる距離を設定します|p2_hover=キャラクターが 'origin' から各ワールドに沿った軸方向に徘徊できる距離を設定します
|p3_type=list|p3_subtype=instructions|p3_name=options|p3_desc=WANDER_* flags and their parameters
|p3_type=list|p3_subtype=instructions|p3_name=options|p3_desc=WANDER_* フラグとそのパラメータ
|constants={{LSL_Constants/llWanderWithin}}
|constants={{LSL_Constants/llWanderWithin/ja}}
|caveats=
|caveats=
* Must use [[llCreateCharacter]] or script won't compile.
* [[llCreateCharacter]] を使用しないとスクリプトがコンパイルされません。
* Wander area is a rough area based on the specified origin, to a specified scale on each axis. So, if <20, 10, 2>m is specified the object will wander within 20m along the world x-axis, 10m along the world y-axis, and 2m along the world z-axis.
* 徘徊エリアは指定された中心点を基準に、各軸ごとに指定されたスケールで形成される粗いエリアです。たとえば、<20, 10, 2>m が指定された場合、オブジェクトはワールドの x 軸に沿って 20m、y 軸に沿って 10m、z 軸に沿って 2m にわたって徘徊します。
* When [[WANDER_PAUSE_AT_WAYPOINTS]] is enabled, [[PU_GOAL_REACHED]] and [[PU_SLOWDOWN_DISTANCE_REACHED]] [[path_update]] events will be trigged when approaching each waypoint.  When this flag is disabled, the aforementioned path_update events will not be triggered when arriving at waypoints.
* [[WANDER_PAUSE_AT_WAYPOINTS]] が有効な場合、各ウェイポイントに近づくと [[PU_GOAL_REACHED]] および [[PU_SLOWDOWN_DISTANCE_REACHED]] [[path_update]] イベントがトリガーされます。このフラグが無効な場合、前述の path_update イベントはウェイポイントに到達したときにトリガーされません。
* Wander area can be limited to a smaller area by introducing obstacles such as walls.
* 徘徊エリアは壁などの障害物を導入することでより小さなエリアに制限できます。
* Vertical positions specified for any vectors should be chosen to be as close as possible to the actual height of the terrain requested. Large difference between the provided vertical position and the actual terrain/object will result in failure of the behavior.
* 任意のベクトルの垂直位置は、要求された地形の実際の高さにできるだけ近い位置を選択する必要があります。提供された垂直位置と実際の地形/オブジェクトとの大きな差異は、動作の失敗を引き起こします。
* As for all pathfinding behaviors, DO NOT rely on the detailed implementation here. The wander distance is just a rough estimate. We may change the exact shape on a whim. For fun. Or because it seems better that way. Or to ensure that you aren't relying on the detailed implementation. Don't make this another {{Jira|PATHBUG-69}}. :)  
* すべてのパスファインディング動作と同様に、ここでの詳細な実装に依存しないでください。徘徊距離はあくまでおおよその見積もりです。詳細な形状は気まぐれで変更される可能性があります。楽しみのため、またはそれが良いと思われるため、または詳細な実装に依存していないことを確認するために変更される可能性があります。これを {{Jira|PATHBUG-69}} のようなものにしないでください。 :)
|examples=
|examples=
<source lang="lsl2">
<source lang="lsl2">

Latest revision as of 12:25, 22 November 2023

要約

関数: llWanderWithin( vector origin, vector dist, list options );

キャラクターを指定された半径内の中心点を中心に徘徊させます。

• vector origin 徘徊する中心点
• vector dist キャラクターがoriginから各ワールドに沿った軸方向に徘徊できる距離を設定します
• list options WANDER_* フラグとそのパラメータ

オプション V パラメータ デフォルト 説明
WANDER_PAUSE_AT_WAYPOINTS ] 0 integer boolean ] FALSE ] 各徘徊ウェイポイントに到達した後にキャラクターが一時停止するかどうか。

警告

  • llCreateCharacter を使用しないとスクリプトがコンパイルされません。
  • 徘徊エリアは指定された中心点を基準に、各軸ごとに指定されたスケールで形成される粗いエリアです。たとえば、<20, 10, 2>m が指定された場合、オブジェクトはワールドの x 軸に沿って 20m、y 軸に沿って 10m、z 軸に沿って 2m にわたって徘徊します。
  • WANDER_PAUSE_AT_WAYPOINTS が有効な場合、各ウェイポイントに近づくと PU_GOAL_REACHED および PU_SLOWDOWN_DISTANCE_REACHEDpath_update イベントがトリガーされます。このフラグが無効な場合、前述の path_update イベントはウェイポイントに到達したときにトリガーされません。
  • 徘徊エリアは壁などの障害物を導入することでより小さなエリアに制限できます。
  • 任意のベクトルの垂直位置は、要求された地形の実際の高さにできるだけ近い位置を選択する必要があります。提供された垂直位置と実際の地形/オブジェクトとの大きな差異は、動作の失敗を引き起こします。
  • すべてのパスファインディング動作と同様に、ここでの詳細な実装に依存しないでください。徘徊距離はあくまでおおよその見積もりです。詳細な形状は気まぐれで変更される可能性があります。楽しみのため、またはそれが良いと思われるため、または詳細な実装に依存していないことを確認するために変更される可能性があります。これを PATHBUG-69 のようなものにしないでください。 :)
All Issues ~ Search JIRA for related Bugs

サンプル

default
{
    state_entry()
    {
        llCreateCharacter([CHARACTER_MAX_SPEED, 25, CHARACTER_DESIRED_SPEED, 15.0]);
        //MAX_SPEED is @ 20 by default
    }

    touch_start(integer total_number)
    {
        llWanderWithin(llGetPos(), <10.0, 10.0, 5.0>, [WANDER_PAUSE_AT_WAYPOINTS, TRUE]);
    }
}

特記事項

経緯

Date of Release 31/07/2012

Search JIRA for related Issues

Signature

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