LlTriggerSound
| 首页 | 函数 | 事件 | 类型 | 操作符 | 常数 | Flow Control | Script Library | Categorized Library | Tutorials |
| 函数名 |
|---|
| Function: llTriggerSound( string sound, float volume ); |
| 参数:以音量播放声音,以对象为中心但不附着在对象上。
•字符串声音–此脚本所在的prim目录中的声音或声音的UUID •浮子音量–介于0.0(无声)和1.0(响亮)之间(0.0<=音量<=1.0) 如果物体移动,声音就不会随之移动。 使用llPlaySound播放附加到对象的声音。 |
| 返回值:无 |
| 注意事项 |
|---|
| 如果prim的清单中缺少声音,并且它不是UUID或者不是声音,那么在DEBUG峈CHANNEL上会发出一个错误。
如果sound是一个UUID,那么对象没有新的资产权限后果。 生成的对象不会产生新的使用限制,如果资产被放在prims库存中,可能会出现这种情况。 |
| 示例 |
|---|
示例1
//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 |
| 相关事件 |
|---|
| 无 |