Difference between revisions of "LlReplaceEnvironment/ja"

From Second Life Wiki
Jump to navigation Jump to search
m
m
Line 1: Line 1:
{{LSL_Function/ja
{{LSL_Function/ja
|func=llReplaceEnvironment
|func=llReplaceEnvironment
|func_desc=The llReplaceEnvironment function replaces the environment in a parcel or a region. Either for a single elevation track or the entire environment. The owner of the script must have permission to edit the environment on the destination parcel, or be an estate manage in the case of an entire region.
|func_desc=llReplaceEnvironment関数は、パーセルまたはリージョンの環境を置き換えます。単一の高度トラックまたは全体の環境に対応します。スクリプトの所有者は、宛先パーセルで環境を編集する権限を持っているか、リージョン全体の場合はエステートマネージャである必要があります。
In most cases errors are reported as a return value from the function (see table below). However, issues with the environment assets may be reported in the debug chat.
ほとんどの場合、エラーは関数からの戻り値として報告されます(以下の表を参照)。ただし、環境アセットに関する問題はデバッグチャットで報告される場合があります。
|return_type=Integer
|return_type=Integer
|p1_type=vector|p1_name=position|p1_desc=The position in the region of the parcel that will receive the new environment. To change the entire region use <-1, -1, -1>. The z component of the vector is ignored.
|p1_type=vector|p1_name=position|p1_desc=新しい環境を受け取るパーセルのリージョン内の位置。リージョン全体を変更するには<-1, -1, -1>を使用します。ベクトルのZ成分は無視されます。
|p2_type=string|p2_name=environment|p2_desc=The name of an environmental setting in the object's inventory or the asset ID for an environment. NULL_KEY or empty string to remove the environment.
|p2_type=string|p2_name=environment|p2_desc=オブジェクトのインベントリ内の環境設定の名前または環境のアセットID。環境を削除するにはNULL_KEYまたは空の文字列を使用します。
|p3_type=integer|p3_name=track_no|p3_desc=The elevation zone to change. 0 for water, 1 for ground level, 2 for sky 1000m, 3 for sky 2000m, 4 for sky 3000m. -1 to change all tracks.
|p3_type=integer|p3_name=track_no|p3_desc=変更する高度ゾーン。水域の場合は0、地上の場合は1、空の高度1000mの場合は2、空の高度2000mの場合は3、空の高度3000mの場合は4。すべてのトラックを変更するには-1。
|p4_type=integer|p4_name=day_length|p4_desc=The length in seconds for the day cycle. -1 to leave unchanged.
|p4_type=integer|p4_name=day_length|p4_desc=日サイクルの秒数。変更しない場合は-1。
|p5_type=integer|p5_name=day_offset|p5_desc=The offset in seconds from UTC. -1 to leave unchanged.
|p5_type=integer|p5_name=day_offset|p5_desc=UTCからの秒単位のオフセット。変更しない場合は-1。
|constants=
|constants=
{{{!}} class="sortable" {{Prettytable|style=margin-top:0;}}
{{{!}} class="sortable" {{Prettytable|style=margin-top:0;}}
Line 26: Line 26:
{{!}}}
{{!}}}
|caveats=
|caveats=
* An environment set locally on the viewer will override any environment set from this function.
* ビューアでローカルに設定された環境は、この関数から設定された環境を上書きします。
* A parameter override set by [[llSetEnvironment]] will be preserved after the environment is replaced by this function.  Call [[llSetEnvironment]] with an empty list parameter to clear any straggling overrides.
* [[llSetEnvironment]] によって設定されたパラメータのオーバーライドは、この関数によって環境が置き換えられた後も保持されます。余分なオーバーライドをクリアするには、空のリストパラメータで [[llSetEnvironment]] を呼び出します。
* The environment specified by this function is applied asynchronously, as the simulator must download the environment asset before applying it. This means that [[llGetEnvironment]] will not immediately reflect the new environment's parameters, although the delay is typically quite small.
* この関数によって指定された環境は非同期で適用されます。シミュレータは環境アセットをダウンロードして適用する必要があるため、[[llGetEnvironment]] は新しい環境のパラメータをすぐに反映しません。ただし、遅延は通常非常に小さいです。
* If a UUID is passed as the environment parameter and that UUID does not specify an environment setting or one can not be constructed, the function will return success (1) but will post a message to the debug channel.
* 環境パラメータとしてUUIDが渡され、そのUUIDが環境設定を指定していないか、構築できない場合、関数は成功(1)を返しますが、デバッグチャネルにメッセージを投稿します。
|examples=<source lang="lsl2">
|examples=<source lang="lsl2">
//  Will set the entire region to the "Tropicalia" EEP from the Linden inventory when touched.  
//  Will set the entire region to the "Tropicalia" EEP from the Linden inventory when touched.  

Revision as of 14:53, 22 November 2023

要約

関数: Integer llReplaceEnvironment( vector position, string environment, integer track_no, integer day_length, integer day_offset );

llReplaceEnvironment関数は、パーセルまたはリージョンの環境を置き換えます。単一の高度トラックまたは全体の環境に対応します。スクリプトの所有者は、宛先パーセルで環境を編集する権限を持っているか、リージョン全体の場合はエステートマネージャである必要があります。 ほとんどの場合、エラーは関数からの戻り値として報告されます(以下の表を参照)。ただし、環境アセットに関する問題はデバッグチャットで報告される場合があります。
Integer で返します。

• vector position 新しい環境を受け取るパーセルのリージョン内の位置。リージョン全体を変更するには<-1, -1, -1>を使用します。ベクトルのZ成分は無視されます。
• string environment オブジェクトのインベントリ内の環境設定の名前または環境のアセットID。環境を削除するにはNULL_KEYまたは空の文字列を使用します。
• integer track_no 変更する高度ゾーン。水域の場合は0、地上の場合は1、空の高度1000mの場合は2、空の高度2000mの場合は3、空の高度3000mの場合は4。すべてのトラックを変更するには-1。
• integer day_length 日サイクルの秒数。変更しない場合は-1。
• integer day_offset UTCからの秒単位のオフセット。変更しない場合は-1。

Return Values
Value Constant Description
1 The parcel or region will attempt to change the applied environment.
ENV_NO_ENVIRONMENT -3 The environment inventory object could not be found.
ENV_THROTTLE -8 The scripts have exceeded the throttle. Wait and retry the request.
ENV_NO_PERMISSIONS -9 The script does not have permission to change the environment at the selected location.
OR
there was an attempt to remove altitude track 0 or 1 (in this case a message will also be chatted to the debug channel).

警告

  • ビューアでローカルに設定された環境は、この関数から設定された環境を上書きします。
  • llSetEnvironment によって設定されたパラメータのオーバーライドは、この関数によって環境が置き換えられた後も保持されます。余分なオーバーライドをクリアするには、空のリストパラメータで llSetEnvironment を呼び出します。
  • この関数によって指定された環境は非同期で適用されます。シミュレータは環境アセットをダウンロードして適用する必要があるため、llGetEnvironment は新しい環境のパラメータをすぐに反映しません。ただし、遅延は通常非常に小さいです。
  • 環境パラメータとしてUUIDが渡され、そのUUIDが環境設定を指定していないか、構築できない場合、関数は成功(1)を返しますが、デバッグチャネルにメッセージを投稿します。
All Issues ~ Search JIRA for related Bugs

サンプル

//  Will set the entire region to the "Tropicalia" EEP from the Linden inventory when touched. 
//  It will set all the tracks to the same EEP with 24 hour day and a -8 hour Day Offset.
//  The "Tropicalia" must be in the prims inventory with the script.  
//
//  Limited to Estate Managers or Region owners.
//  Madi Perth - 4/17/2023

default
{

    touch_start(integer total_number)
    {
        llReplaceEnvironment(<-1, -1, -1>, "Tropicalia", -1, 86400, (86400-28800));
    }
}

関連項目

特記事項

経緯

Date of Release 12/08/2022

Search JIRA for related Issues

Signature

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