Difference between revisions of "LlSetSoundRadius/ja"

From Second Life Wiki
Jump to navigation Jump to search
m (Undo revision 849752 by Mako Nozaki (Talk))
m
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{LSL_Function/ja
{{Issues/SVC-3058}}{{LSL_Function/Headless
|inject-2={{LSL Function/link-face/ja|link}}
 
|head={{LSL_Function/Head
|func=llSetSoundRadius
|func_id=209|func_sleep=0.0|func_energy=10.0
|func_id=209|func_sleep=0.0|func_energy=10.0
|func=llSetSoundRadius|p1_type=float|p1_name=radius
|p1_type=float|p1_name=radius|p1_desc=メートル
|func_footnote
|func_footnote
|func_desc=組み込まれた音の聞き取れる、確定的な区切りの範囲'''radius'''を設定します。({{HoverLink/ja|llPlaySound|音はプリム内にある|添付されたもの}}と{{HoverLink/ja|llTriggerSound|音はプリム内にない|きっかけをあたえられたもの}}の両方)
|func_desc
|return_text
|return_text
|spec
}}{{LSL_Function/Head
|caveats
|func=llLinkSetSoundRadius
|func_id=|func_sleep=0.0|func_energy=10.0
|p1_type=integer|p1_subtype=link|p1_name=link
|p2_type=float|p2_name=radius
|func_footnote
|func_desc
|return_text
}}
 
|summary=スクリプトで再生されるサウンド ({{HoverLink|llPlaySound|サウンドがプリムと一緒に移動します|付随したもの}} と {{HoverLink|llTriggerSound|サウンドがプリムと一緒に移動しません|引き起こされたもの}} の両方) が聞き取れる遮断領域を '''radius''' に設定します。
 
|caveats=
* This function is a prim property, thus will survive script resets.
|constants
|constants
|examples
|examples=
Enable sound cutoff at 4 meters.
<source lang="lsl2">
llSetSoundRadius(4); //Enable sound cutoff at 4 meters.
</source>
Disable sound cutoff.
<source lang="lsl2">
llSetSoundRadius(0); //Disable sound cutoff.
</source>
|helpers
|helpers
|also_functions={{LSL DefineRow|2=[[llTriggerSoundLimited/ja|llTriggerSoundLimited]]|3=}}
|also_functions={{LSL DefineRow||[[llTriggerSoundLimited/ja]]|}}
|also_tests
|also_tests
|also_events
|also_events
|also_articles
|also_articles
|notes
|notes=
|cat1=Sound
Pass 0 to this function to disable it.
|cat1=Sound/ja
|cat2
|cat2
|cat3
|cat3
|cat4
|cat4
|history={{LSL Added|0.4.0|remote=http://secondlife.wikia.com/wiki/Version_0.4.0}}
}}
}}

Latest revision as of 12:05, 9 October 2023

Summary

Summary: llSetSoundRadius, llLinkSetSoundRadius

スクリプトで再生されるサウンド (付随したもの引き起こされたもの の両方) が聞き取れる遮断領域を radius に設定します。

llSetSoundRadius

Function: llSetSoundRadius( float radius );
• float radius メートル

Important Issues

~ All Issues ~ Search JIRA for related Bugs
   Function: llSetSoundRadius( float radius ); fails to limit sound to radius

llLinkSetSoundRadius

Function: llLinkSetSoundRadius( integer link, float radius );
• integer link リンク 番号 (0: リンクなし, 1: ルートプリム, >1: 子プリム) または LINK_* フラグ
• float radius メートル
All Issues ~ Search JIRA for related Bugs
フラグ 説明
LINK_ROOT 1 リンクセットの中のルートプリムに送ります
LINK_SET -1 全プリムに送ります
LINK_ALL_OTHERS -2 自分以外の全プリムに送ります
フラグ 説明
LINK_ALL_CHILDREN -3 (ルートプリム以外の全ての)子プリムに送ります
LINK_THIS -4 スクリプトの入った自プリムに送ります

Caveats

  • This function is a prim property, thus will survive script resets.
All Issues ~ Search JIRA for related Bugs

Examples

Enable sound cutoff at 4 meters.

llSetSoundRadius(4); //Enable sound cutoff at 4 meters.

Disable sound cutoff.

llSetSoundRadius(0); //Disable sound cutoff.

Notes

リンク番号

オブジェクトを構成するそれぞれのプリムにはアドレスがあります。それがリンク番号です。オブジェクトの特定のプリムにアクセスするには、そのプリムのリンク番号を知らなければなりません。リンク番号はプリムに振られますが、オブジェクトに座っているアバターにも振られます。

  • オブジェクトが単一のプリムで構成されていて、アバターが座っていないとき、(ルート)プリムのリンク番号は 0 です。
  • しかし、オブジェクトが複数のプリムで構成されていたり、オブジェクトに座っているアバターがいたりすると、ルートプリムのリンク番号は 1 となります。

アバターがオブジェクトに座ると、リンクセットの末尾に追加され、いちばん大きなリンク番号が振られることになります。さらに、アバターがオブジェクトに座っている場合、アバターを立たせないと、プリムのリンク・リンク解除ができません。

プリムやアバターの数え方

オブジェクトのプリムや、プリムに座っているアバターの数を調べるのに、2つの関数があります。

  • llGetNumberOfPrims() - プリムと座っているアバターの数を返します。
  • llGetObjectPrimCount(llGetKey()) - オブジェクトのプリムの数だけを返しますが、アタッチメントとなっている場合は 0 を返します。
integer GetPrimCount() { //常にプリムの数だけを返します。
    if(llGetAttached())//装着されているか?
        return llGetNumberOfPrims();//アバターとプリムの数を返しますが、アタッチメントの上には座れないのでこれでいいです。
    return llGetObjectPrimCount(llGetKey());//プリムの数だけを返しますが、アタッチメントの場合ここは通りません。
}

Pass 0 to this function to disable it.

See Also

Functions

•  llGetLinkNumber スクリプトが入っているプリムのリンク番号を取得します。
•  llGetLinkNumberOfSides/ja Returns the number of faces of the linked prim.
•  llTriggerSoundLimited/ja

Deep Notes

History

All Issues

~ Search JIRA for related Issues
   Function: llSetSoundRadius( float radius ); fails to limit sound to radius

Footnotes

  1. ^ Early release notes were not very accurate or thorough, they sometimes included information about features added in previous releases or failed to include information about features added in that release.

Signature

function void llSetSoundRadius( float radius );
function void llLinkSetSoundRadius( integer link, float radius );