载入中。。。 'S bLog
 
载入中。。。
 
载入中。。。
载入中。。。
载入中。。。
载入中。。。
载入中。。。
 
填写您的邮件地址,订阅我们的精彩内容:


 
llListen控制音量示例
[ 2007/7/15 19:50:00 | By: 梦翔儿 ]
 
以下是控制音量的示例,将这个脚本和bell音乐放在一起,当在公共频道说low,medium,high是音量会不同.

float volumeLow=0.3;           // make a volumelowvariable
float volumeMedium=0.6;
float volumeHigh=1.0;

default
{
    state_entry()
    {
        llListen(0,"",NULL_KEY,""); //listen on channel 0 to anyone
    }

    listen(integer channel,string name,key id,string message) //this is the listen event
{
    if (message=="low")    //if someone says low
    {
        llPlaySound("bell",volumeLow);   
    }
   
    if (message=="medium")    //if someone says Medium
    {
        llPlaySound("bell",volumeMedium);   
    }   
   
    if (message=="high")    //if someone says Medium
    {
        llPlaySound("bell",volumeHigh);   
    }
}
}

 
 
  • 标签:llListen second life 
  • 发表评论:
    载入中。。。

     
     
     

    梦翔儿网站 梦飞翔的地方 http://www.dreamflier.net
    中华人民共和国信息产业部TCP/IP系统 备案序号:辽ICP备09000550号

    Powered by Oblog.