查看: 2200|回复: 2

[有事请教] 请问如何完全禁止音乐音效播放

[复制链接]
梦石
0
星屑
2197
在线时间
225 小时
注册时间
2018-4-23
回帖
83
发表于 2023-3-4 12:53:43 | 显示全部楼层 |阅读模式
悬赏10星屑已解决
请问如何完全禁止音乐音效播放  就是让程序跳过这一步 不执行

最佳答案

查看完整内容

下面的代码位于rpg_objects.js第10000行,它们是【事件指令】中那些音频控制的实现。 只要在任何一个函数开头用if()语句判定变量、开关等条件就能做到【满足/不满足某些条件时该指令才执行】。 注意这里只给出了事件指令,而“切换地图、战斗、乘降载具、菜单操作声效”等不受控制,如有需要请进一步修改AudioManager下的四个playXxx函数。 [pre lang="javascript" line="9977"]// Play BGM Game_Interpreter.prototype.command241 ...
梦石
2
星屑
8479
在线时间
463 小时
注册时间
2021-12-4
回帖
486

MZ评测员

发表于 2023-3-4 12:53:44 | 显示全部楼层
下面的代码位于rpg_objects.js第10000行,它们是【事件指令】中那些音频控制的实现。
只要在任何一个函数开头用if()语句判定变量、开关等条件就能做到【满足/不满足某些条件时该指令才执行】。
注意这里只给出了事件指令,而“切换地图、战斗、乘降载具、菜单操作声效”等不受控制,如有需要请进一步修改AudioManager下的四个playXxx函数。
  1. // Play BGM
  2. Game_Interpreter.prototype.command241 = function() {
  3.     AudioManager.playBgm(this._params[0]);
  4.     return true;
  5. };

  6. // Fadeout BGM
  7. Game_Interpreter.prototype.command242 = function() {
  8.     AudioManager.fadeOutBgm(this._params[0]);
  9.     return true;
  10. };

  11. // Save BGM
  12. Game_Interpreter.prototype.command243 = function() {
  13.     $gameSystem.saveBgm();
  14.     return true;
  15. };

  16. // Resume BGM
  17. Game_Interpreter.prototype.command244 = function() {
  18.     $gameSystem.replayBgm();
  19.     return true;
  20. };

  21. // Play BGS
  22. Game_Interpreter.prototype.command245 = function() {
  23.     AudioManager.playBgs(this._params[0]);
  24.     return true;
  25. };

  26. // Fadeout BGS
  27. Game_Interpreter.prototype.command246 = function() {
  28.     AudioManager.fadeOutBgs(this._params[0]);
  29.     return true;
  30. };

  31. // Play ME
  32. Game_Interpreter.prototype.command249 = function() {
  33.     AudioManager.playMe(this._params[0]);
  34.     return true;
  35. };

  36. // Play SE
  37. Game_Interpreter.prototype.command250 = function() {
  38.     AudioManager.playSe(this._params[0]);
  39.     return true;
  40. };

  41. // Stop SE
  42. Game_Interpreter.prototype.command251 = function() {
  43.     AudioManager.stopSe();
  44.     return true;
  45. };
复制代码
回复

使用道具 举报

梦石
0
星屑
2197
在线时间
225 小时
注册时间
2018-4-23
回帖
83
 楼主| 发表于 2023-3-5 20:44:47 | 显示全部楼层
谢谢 大哥
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部