背景音乐部分代码

1、单个区域点击播放/停止1个音乐:

查看
 "音乐": [
  {
    "sound": "sound/1.mp3",
    "sound_channel": 1,
    "sound_loop": true,
    "text": "音乐:开",
    "var_floats": [ {"name": "yy","equal": 0.0,"assign": 1.0}]
  },
  {
    "text": "音乐:关",
    "command": "stop_sound 1",
    "var_floats": [{"name": "yy","equal": 1.0,"assign": 0.0}]
  }
],

2、点击选择多个音乐播放:

查看

“音乐”: [
{
“text”: “选择”,
“choices”: [
{
“text”: “关闭”,
“next_mtn”: “关闭”
},
{
“text”: “音乐1”,
“next_mtn”: “音乐1”
},
{
“text”: “音乐2”,
“next_mtn”: “音乐2”
},
{
“text”: “音乐3”,
“next_mtn”: “音乐3”
}
]
}
],
“关闭”: [
{
“command”: “stop_sound 1”
}
],
“音乐1”: [
{
“sound”: “sound/1.mp3”,
“sound_channel”: 1,
“sound_loop”: true
}
],
“音乐2”: [
{
“sound”: “sound/2.mp3”,
“sound_channel”: 1,
“sound_loop”: true
}
],
“音乐3”: [
{
“sound”: “sound/3.mp3”,
“sound_channel”: 1,
“sound_loop”: true
}
],

5 个赞

2.6.6版本新增了sound_loop属性,无需用next_mtn来循环播放了

可真快:laughing:

还能加音乐 厉害。感谢分享命令符