Difference between revisions of "LlStopSound/ja"

From Second Life Wiki
Jump to navigation Jump to search
(Initial translation)
 
m
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{LSL_Function/ja
{{LSL_Function/Headless
|inject-2={{LSL Function/link-face/ja|link}}
 
|head={{LSL Function/Head
|func=llStopSound
|func_id=92|func_sleep=0.0|func_energy=10.0
|func_id=92|func_sleep=0.0|func_energy=10.0
|func=llStopSound
|func_footnote
|func_footnote
|func_desc=添付されている再生中の全ての音を停止します。
|func_desc
|return_text
}}{{LSL Function/Head
|func=llLinkStopSound
|p1_type=integer|p1_subtype=link|p1_name=link
|func_id=|func_sleep=0.0|func_energy=10.0
|func_footnote
|func_desc
|return_text
|return_text
|spec
}}
|caveats=*特定の音だけ停止することはできません。
|summary=現在再生している付随したサウンドを停止します。
|caveats=
*特定のサウンドだけ停止することはできません。
*リンクセットの中では、[[llLinkStopSound/ja]] を使って音を停止してください
 
|constants
|constants
|examples
|examples=
<source lang="lsl2">
default
{
    state_entry()
    {
        llLoopSound("string soundname if in object inventory or UUID", 1.0);
    }
    touch_start(integer total_number)
    {
        llStopSound();//As if by magic the sound stops!!
    }
}
</source>
|helpers
|helpers
|also_functions=
|also_functions=
{{LSL DefineRow||{{LSLG/ja|llSound}}|3=この関数は非推奨なので、代わりに {{LSLG/ja|llPlaySound}} を使ってください。}}
{{LSL DefineRow||[[llSound/ja]]|3=この関数は非推奨なので、代わりに {{LSLG/ja|llPlaySound}} を使ってください。}}
{{LSL DefineRow||{{LSLG/ja|llPlaySound}}}}
{{LSL DefineRow||[[llPlaySound/ja]]}}
{{LSL DefineRow||{{LSLG/ja|llPlaySoundSlave}}}}
{{LSL DefineRow||[[llPlaySoundSlave/ja]]}}
{{LSL DefineRow||{{LSLG/ja|llLoopSound}}}}
{{LSL DefineRow||[[llLoopSound/ja]]}}
{{LSL DefineRow||{{LSLG/ja|llLoopSoundMaster}}}}
{{LSL DefineRow||[[llLoopSoundMaster/ja]]}}
{{LSL DefineRow||{{LSLG/ja|llLoopSoundSlave}}}}
{{LSL DefineRow||[[llLoopSoundSlave/ja]]}}
|also_tests
|also_tests
|also_events
|also_events
Line 22: Line 49:
|notes
|notes
|deprecated
|deprecated
|cat1=Sound
|cat1=Sound/ja
|cat2=Stop
|cat2=Stop/ja
|cat3
|cat3
|cat4
|cat4
}}
}}

Latest revision as of 22:26, 7 October 2023

Summary

Summary: llStopSound, llLinkStopSound

現在再生している付随したサウンドを停止します。

llStopSound

Function: llStopSound( );

llLinkStopSound

Function: llLinkStopSound( integer link );
• integer link リンク 番号 (0: リンクなし, 1: ルートプリム, >1: 子プリム) または LINK_* フラグ
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

  • 特定のサウンドだけ停止することはできません。
  • リンクセットの中では、llLinkStopSound/ja を使って音を停止してください
All Issues ~ Search JIRA for related Bugs

Examples

default
{
    state_entry()
    {
        llLoopSound("string soundname if in object inventory or UUID", 1.0);
    }
    touch_start(integer total_number)
    {
        llStopSound();//As if by magic the sound stops!!
    }
}

Notes

リンク番号

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

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

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

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

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

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

See Also

Functions

•  llGetLinkNumber スクリプトが入っているプリムのリンク番号を取得します。
•  llGetLinkNumberOfSides/ja Returns the number of faces of the linked prim.
•  llSound/ja この関数は非推奨なので、代わりに llPlaySound を使ってください。
•  llPlaySound/ja
•  llPlaySoundSlave/ja
•  llLoopSound/ja
•  llLoopSoundMaster/ja
•  llLoopSoundSlave/ja

Deep Notes

Search JIRA for related Issues

Signature

function void llStopSound();
function void llLinkStopSound( integer link );