LlTriggerSound/ja - Second Life Wiki

LlTriggerSound/ja

From Second Life Wiki

Jump to: navigation, search

関数: llTriggerSound( string sound, float volume );

オブジェクトに添付されていない音を中心に、volumeの音量でsoundを再生します。

• string sound sound名、あるいはUUID
• float volume 0.0(消音)と1.0(大音量)の間(0.0 <= volume <= 1.0)


オブジェクトを動かした場合、音はオブジェクトと一緒に動きません。
オブジェクトに添付された音を再生するには、llPlaySoundを使いましょう。

警告

  • soundがプリム内から無くなっている場合、UUIDがない、あるいはそのsoundではない場合、エラーがDEBUG_CHANNELで報告されます。

//When touched, object containing this script will trigger the sound entered.
//This function allows object to trigger sound even if attached to an avatar (AGENT)
//Creator: TonyH Wrangler
 
string sound = "ed124764-705d-d497-167a-182cd9fa2e6c"; //uuid or name of item in inventory
 
default
{
    touch_start(integer total_num)
    {
        llTriggerSound(sound, 1.0);
    }
}

関連項目

関数

•  llPlaySound
•  llTriggerSoundLimited