Difference between revisions of "LlSitOnLink/ja"

From Second Life Wiki
Jump to navigation Jump to search
m
m
Line 2: Line 2:
{{LSL_Function/ja
{{LSL_Function/ja
|func=llSitOnLink
|func=llSitOnLink
|func_desc=The avatar specified by agent_id is forced to sit on the sit target of the prim indicated by the link parameter.  If the specified link is already occupied, the simulator searches down the chain of prims in the link set looking for an available sit target. 
|func_desc=agent_idで指定されたアバターをlinkパラメータで示されるprimの座席ターゲットに座らせます。指定されたリンクが既に占有されている場合、シミュレータはリンクセット内のprimのチェーンを下って利用可能な座席ターゲットを検索します。


|func_footnote=If successful, this method returns 1. 
|func_footnote=成功した場合、このメソッドは1を返します。


If the function fails, it returns a negative number constant.
関数が失敗した場合、負の数の定数が返されます。


Link constants that indicate a single prim may be used for the link parameter.  These are LINK_ROOT and LINK_THIS.  Other constants such as LINK_SET, LINK_CHILDREN, LINK_ALL_OTHERS will return an INVALID_LINK error.
LINK_ROOTやLINK_THISなど、単一のprimを示すリンク定数はlinkパラメータに使用できます。LINK_SET、LINK_CHILDREN、LINK_ALL_OTHERSなどの他の定数はINVALID_LINKエラーを返します。


'''''This method must be called from an experience enabled script running on land that has enabled the experience key.''''' If these conditions are not met this method returns a NOT_EXPERIENCE error.
'''''このメソッドは、有効なエクスペリエンス キーが有効になっている土地で実行されているエクスペリエンス対応スクリプトから呼び出す必要があります。''''' これらの条件が満たされていない場合、このメソッドはNOT_EXPERIENCEエラーを返します。


The targeted avatar must also have accepted the experience.  If the user is not participating in the experience this method returns NO_EXPERIENCE_PERMISSION. If the avatar id can not be found or is not over land that has enabled the experience this method returns INVALID_AGENT.
対象のアバターはエクスペリエンスを受け入れる必要もあります。ユーザーがエクスペリエンスに参加していない場合、このメソッドはNO_EXPERIENCE_PERMISSIONを返します。アバターIDが見つからないか、エクスペリエンスが有効になっている土地の上にいない場合、このメソッドはINVALID_AGENTを返します。


If there are no valid sit targets remaining in the linkset this method returns NO_SIT_TARGET and no action is taken with the avatar.
リンクセットに有効な座席ターゲットが残っていない場合、このメソッドはNO_SIT_TARGETを返し、アバターには何も実行されません。


If the avatar does not have access to the parcel containing the prim running this script, this call fails.
アバターがこのスクリプトを実行しているprimが含まれるパーセルへのアクセス権がない場合、この呼び出しは失敗します。
|return_type=Integer
|return_type=Integer
|p1_type=key|p1_name=agent_id|p1_desc=UUID of the avatar being forced to sit
|p1_type=key|p1_name=agent_id|p1_desc=座らせるアバターのUUID
|p2_type=integer|p2_name=link|p2_desc=Link number for the prim containing the desired sit target
|p2_type=integer|p2_name=link|p2_desc=座席ターゲットを含むprimのリンク番号
|constants={{llSitOnLinkConstants}}
|constants={{llSitOnLinkConstants}}
|notes=This function was introduced in conjunction with new [[llSetPrimitiveParams|primitive parameter]] constants: [[PRIM_ALLOW_UNSIT]], [[PRIM_SCRIPTED_SITS_ONLY]], and [[PRIM_SIT_TARGET]].
|notes=この関数は新しい[[llSetPrimitiveParams|primitive parameter]]定数とともに導入されました: [[PRIM_ALLOW_UNSIT]][[PRIM_SCRIPTED_SITS_ONLY]][[PRIM_SIT_TARGET]]
|also_functions=
|also_functions=
* [[llLinkSitTarget/ja]]
* [[llLinkSitTarget/ja]]

Revision as of 16:33, 22 November 2023

要約

関数: Integer llSitOnLink( key agent_id, integer link );

agent_idで指定されたアバターをlinkパラメータで示されるprimの座席ターゲットに座らせます。指定されたリンクが既に占有されている場合、シミュレータはリンクセット内のprimのチェーンを下って利用可能な座席ターゲットを検索します。
Integer で返します。

• key agent_id 座らせるアバターのUUID
• integer link 座席ターゲットを含むprimのリンク番号

成功した場合、このメソッドは1を返します。

関数が失敗した場合、負の数の定数が返されます。

LINK_ROOTやLINK_THISなど、単一のprimを示すリンク定数はlinkパラメータに使用できます。LINK_SET、LINK_CHILDREN、LINK_ALL_OTHERSなどの他の定数はINVALID_LINKエラーを返します。

このメソッドは、有効なエクスペリエンス キーが有効になっている土地で実行されているエクスペリエンス対応スクリプトから呼び出す必要があります。 これらの条件が満たされていない場合、このメソッドはNOT_EXPERIENCEエラーを返します。

対象のアバターはエクスペリエンスを受け入れる必要もあります。ユーザーがエクスペリエンスに参加していない場合、このメソッドはNO_EXPERIENCE_PERMISSIONを返します。アバターIDが見つからないか、エクスペリエンスが有効になっている土地の上にいない場合、このメソッドはINVALID_AGENTを返します。

リンクセットに有効な座席ターゲットが残っていない場合、このメソッドはNO_SIT_TARGETを返し、アバターには何も実行されません。

アバターがこのスクリプトを実行しているprimが含まれるパーセルへのアクセス権がない場合、この呼び出しは失敗します。

Constant Value Description
SIT_NOT_EXPERIENCE -1 The script is not running as part of an experience with a valid experience key or the experience is not allowed at your location.
SIT_NO_EXPERIENCE_PERMISSION -2 The agent has not granted permission.
SIT_NO_SIT_TARGET -3 Unable to find an open sit target.
SIT_INVALID_AGENT -4 Unable to find specified agent.
SIT_INVALID_LINK -5 Unable to find specified link or the link constant would return multiple prims.
SIT_NO_ACCESS -6 The avatar does not have access to the parcel that the prim running this script is located in.
SIT_INVALID_OBJECT -7 This value is returned if the llSitOnLink is trying to force the user to sit on something that cannot be sat upon (such as an attachment).

サンプル

integer gLinkId = LINK_THIS;

default
{
    touch_start(integer total_number)
    {
        llRequestExperiencePermissions(llDetectedKey(0), "");
    }

    experience_permissions(key agent_id)
    {
        integer sitTest = llSitOnLink(agent_id, gLinkId);
        if (sitTest != 1)
        {
            llInstantMessage(agent_id, "Cannot force agent " + (string)agent_id + " to sit due to reason id: " + (string)sitTest);
        }
    }

    experience_permissions_denied(key agent_id, integer reason)
    {
        llInstantMessage(agent_id, "Denied experience permissions for " + (string)agent_id + " due to reason id: " + (string)reason);
    }
}

注意点

この関数は新しいprimitive parameter定数とともに導入されました: PRIM_ALLOW_UNSITPRIM_SCRIPTED_SITS_ONLYPRIM_SIT_TARGET

特記事項

All Issues

~ Search JIRA for related Issues
   Redesign llSitOnLink() to use the permissions system

Signature

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