LlLoopSoundMaster/ja
From Second Life Wiki
例
// for an uploaded .wav file called "MasterLoop" in inventory llLoopSoundMaster("MasterLoop", 1.0);
下のスクリプトはオブジェクトに追加されると音声マスターのオンとオフを切り替えることができます。スクリプトはマスタの連続再生で呼ばれるインベントリ内の音声、あるいはこれを動かすための関数の引数の変更が必要です。このスクリプトはToggle_Statesスクリプトの簡単な変更物で。動かすにはllLoopSoundMasterとllStopSoundを加えるだけです。
default { state_entry() { // run this code when entering the default state // displays red "OFF" as floating text above the prim llSetText("OFF", <1,0,0>, 1.0); } touch_start(integer num_detected) { // when touched, switch to state named 'on' state on; } } state on { state_entry() { // run this code when entering state 'on' // displays green "ON" as floating text above the prim llSetText("ON", <0,1,0>, 1.0); llLoopSoundMaster("MasterLoop", 1.0); } touch_start(integer num_detected) { // when touched, stop sound & switch back to the default state llStopSound(); state default; } }

