Difference between revisions of "LlSetRegionPos/ja"

From Second Life Wiki
Jump to navigation Jump to search
m
m
 
Line 1: Line 1:
{{LSL Function/ja
{{LSL Function/ja
|inject-2={{LSL_Function/position|position|region=*}}
|inject-2={{LSL_Function/position/ja|position|region=*}}
|func_id=?|func_sleep=0.0|func_energy=0.0
|func_id=?|func_sleep=0.0|func_energy=0.0
|func=llSetRegionPos
|func=llSetRegionPos
|p1_type=vector|p1_name=position
|p1_type=vector|p1_name=position
|return_type=integer
|return_type=integer
|return_text=[[boolean]], [[TRUE]] if the object is successfully placed within 0.1 m of {{LSLP|position}}, [[FALSE]] otherwise. See [[#Specification]] for details.
|return_text=[[boolean]], {{LSLP|position}}から0.1m以内にオブジェクトが正常に配置された場合は[[TRUE]]、それ以外の場合は[[FALSE]]。詳細は[[#Specification]]を参照してください。
|func_desc=Tries to move the entire object so that the root prim is within 0.1m of {{LSLP|position}}.
|func_desc=ルートprimが{{LSLP|position}}から0.1m以内に配置されるように、オブジェクト全体を移動しようとします。
|func_footnote=Only if [[TRUE]] is returned does the object move, if [[FALSE]] is returned, the object does not change position.
|func_footnote=[[TRUE]]が返された場合のみオブジェクトが移動し、[[FALSE]]が返された場合はオブジェクトは位置を変更しません。
|spec=
|spec=
The object with the script will move the root prim position to the given location. The position is any position within the region. If the position is below ground, it will be set to the ground level at that X,Y spot. The function has no delay or throttle.
このスクリプトがあるオブジェクトは、ルートprimの位置を指定された場所に移動させます。位置はリージョン内の任意の位置です。位置が地面より下の場合、そのX、Yスポットの地面レベルに設定されます。この関数には遅延やスロットルはありません。
* Returns [[TRUE]] if the object is successfully placed within 0.1 m of position.
* オブジェクトが{{LSLP|position}}から0.1m以内に正常に配置された場合は[[TRUE]]を返します。
* Returns [[FALSE]] and does not move the object if...
* オブジェクトが動的([[STATUS_PHYSICS|物理が有効]])である場合、または...
** {{LSLP|position}} is more than 10m off region or above 4096m.
** {{LSLP|position}}がリージョンから10m以上離れているか、4096m以上の高さにある場合。
*** The x & y components of {{LSLP|position}} must be in the range {{Interval|gte=-10.0|lte=266.0}}.{{Interval/Footnote}}
*** {{LSLP|position}}のxおよびy成分は{{Interval|gte=-10.0|lte=266.0}}の範囲内である必要があります。{{Interval/Footnote}}
*** The z component must be in the range {{Interval|gte=0.0|lte=4096}}.
*** z成分は{{Interval|gte=0.0|lte=4096}}の範囲内である必要があります。
** the object is dynamic (has [[STATUS_PHYSICS|physics enabled]]).
** オブジェクトが位置に移動できない場合、これは地域/パーセルの制限(オブジェクトエントリールール、prim制限、禁止など)が原因です。
** the object can not move to position due to parcel/region restrictions (object entry rules, prim limits, bans, etc).
** オブジェクトがアバターアタッチメントである場合。
** the object is an avatar attachment.
* オブジェクトが地面より下の場合、[[FALSE]]が返され、オブジェクトが移動します。
* Returns [[FALSE]] and moves the object if the z position is below the ground .
|caveats=
|caveats=
|constants
|constants
Line 52: Line 51:
</syntaxhighlight>
</syntaxhighlight>
|helpers
|helpers
|also_functions={{LSL DefineRow||[[llGetLocalPos]]|Returns the prim's local position if it is attached or non-root (otherwise it returns the global position)}}
|also_functions={{LSL DefineRow||[[llGetLocalPos/ja]]|アタッチされているか非ルートの場合はprimのローカル位置を返します(それ以外の場合はグローバル位置を返します)}}
{{LSL DefineRow||[[llGetRootPosition]]|Gets the root prims position}}
{{LSL DefineRow||[[llGetRootPosition/ja]]|ルートprimの位置を取得します}}
{{LSL DefineRow||[[llGetPos]]|Returns the prim's global position, even if it is attached or non-root}}
{{LSL DefineRow||[[llGetPos/ja]]|アタッチされているか非ルートの場合でもprimのグローバル位置を返します}}
{{LSL DefineRow||[[llSetPos]]|}}
{{LSL DefineRow||[[llSetPos/ja]]|}}
{{LSL DefineRow||[[llEdgeOfWorld]]|}}
{{LSL DefineRow||[[llEdgeOfWorld/ja]]|}}
|also_tests
|also_tests
|also_events
|also_events
Line 63: Line 62:
This function is intended to replace [[WarpPos]].
This function is intended to replace [[WarpPos]].
|history=
|history=
* New LSL function integer llSetRegionPos(vector position) in Second Life Server 12.01.24.248357
* Second Life Server 12.01.24.248357 に新しいLSL関数integer llSetRegionPos(vector position)が導入されました。
*: The object with the script will move the root prim position to the given location. The position is any position within the region. If the position is below ground, it will be set to the ground level at that X,Y spot. The function has no delay or throttle.
* スクリプトがあるオブジェクトは、ルートprimの位置を指定された場所に移動させます。位置はリージョン内の任意の位置です。位置が地面より下の場合、そのX、Yスポットの地面レベルに設定されます。この関数には遅延やスロットルはありません。
*:* Returns 1 if the object is successfully placed within 0.1 m of position.
*:* positionから0.1m以内にオブジェクトが正常に配置された場合は1を返します。
*:* Returns 0 and does not move the object if position is more than 10m off region or above 4096m.
*:* positionがリージョンから10m以上離れているか、4096m以上の高さにある場合は、オブジェクトは移動せず0を返します。
*:* Returns 0 and does not move the object if the object is dynamic (has physics enabled).
*:* オブジェクトが動的(物理が有効)である場合は、オブジェクトは移動せず0を返します。
*:* Returns 0 and does not move the object if the object can not move to position due to object entry rules, prim limits, bans, etc.
*:* オブジェクトがオブジェクトエントリールール、prim制限、禁止などの理由でpositionに移動できない場合は、オブジェクトは移動せず0を返します。
|cat1=Movement
|cat1=Movement
|cat2=Prim
|cat2=Prim

Latest revision as of 16:32, 22 November 2023

要約

関数: integer llSetRegionPos( vector position );

ルートprimがpositionから0.1m以内に配置されるように、オブジェクト全体を移動しようとします。
boolean, positionから0.1m以内にオブジェクトが正常に配置された場合はTRUE、それ以外の場合はFALSE。詳細は#Specificationを参照してください。を integer で返します。

• vector position position in region coordinates

TRUEが返された場合のみオブジェクトが移動し、FALSEが返された場合はオブジェクトは位置を変更しません。

仕様

このスクリプトがあるオブジェクトは、ルートprimの位置を指定された場所に移動させます。位置はリージョン内の任意の位置です。位置が地面より下の場合、そのX、Yスポットの地面レベルに設定されます。この関数には遅延やスロットルはありません。

  • オブジェクトがpositionから0.1m以内に正常に配置された場合はTRUEを返します。
  • オブジェクトが動的(物理が有効)である場合、または...
    • positionがリージョンから10m以上離れているか、4096m以上の高さにある場合。
      • positionのxおよびy成分は[-10.0, 266.0]の範囲内である必要があります。[1]
      • z成分は[0.0, 4096]の範囲内である必要があります。
    • オブジェクトが位置に移動できない場合、これは地域/パーセルの制限(オブジェクトエントリールール、prim制限、禁止など)が原因です。
    • オブジェクトがアバターアタッチメントである場合。
  • オブジェクトが地面より下の場合、FALSEが返され、オブジェクトが移動します。

サンプル

default
{
    touch_start(integer num_detected)
    {
        vector currentPosition = llGetPos();

        // check whether the object has successfully been moved
        // to the center of the sim at the same height
        integer hasMoved = llSetRegionPos(<128.0, 128.0, currentPosition.z>);

        if (hasMoved)
        {
            llOwnerSay("My new position is now:\n"
                + "http://maps.secondlife.com/secondlife/" + llEscapeURL(llGetRegionName())
                + "/128/128/" + (string)llRound(currentPosition.z) + "/");
        }
        else if ( currentPosition.z < llGround(ZERO_VECTOR) )
        {
            llOwnerSay("My new position is now:\n"
                + "http://maps.secondlife.com/secondlife/" + llEscapeURL(llGetRegionName())
                + "/128/128/" + (string)llCeil(llGround(ZERO_VECTOR)) + "/");
        }
        else
            llOwnerSay("Move was not possible!");
    }
}

注意点

This function is intended to replace WarpPos.

関連項目

関数

•  llGetLocalPos/ja アタッチされているか非ルートの場合はprimのローカル位置を返します(それ以外の場合はグローバル位置を返します)
•  llGetRootPosition/ja ルートprimの位置を取得します
•  llGetPos/ja アタッチされているか非ルートの場合でもprimのグローバル位置を返します
•  llSetPos/ja
•  llEdgeOfWorld/ja

特記事項

経緯

  • Second Life Server 12.01.24.248357 に新しいLSL関数integer llSetRegionPos(vector position)が導入されました。
  • スクリプトがあるオブジェクトは、ルートprimの位置を指定された場所に移動させます。位置はリージョン内の任意の位置です。位置が地面より下の場合、そのX、Yスポットの地面レベルに設定されます。この関数には遅延やスロットルはありません。
    • positionから0.1m以内にオブジェクトが正常に配置された場合は1を返します。
    • positionがリージョンから10m以上離れているか、4096m以上の高さにある場合は、オブジェクトは移動せず0を返します。
    • オブジェクトが動的(物理が有効)である場合は、オブジェクトは移動せず0を返します。
    • オブジェクトがオブジェクトエントリールール、prim制限、禁止などの理由でpositionに移動できない場合は、オブジェクトは移動せず0を返します。
Search JIRA for related Issues

脚注

  1. ^ 記事中の範囲は、 実数空間 に記載されているものです。

Signature

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