Hi, I am trying to make a plugin for practice that plays a sound effect (SE) whenever the dialogue box is advanced (player presses confirm/cancel button), but the code I have so far doesn't play the SE.
Can someone explain what I'm doing wrong?
The plugin script:
Apologize for the novice question and thanks in advance 🙂
Can someone explain what I'm doing wrong?
The plugin script:
// PLUGIN COMMANDS
/*:
@target MZ
@plugindesc Plays a Sound Effect when the text box window is advanced or closed.
@param seFile
@text SE File
@desc Sound Effect that will be played when the text box window is advanced or closed.
@require 1
@type file
@dir audio/se
@Default Cursor1
*/
// PLUGIN CODE
(() => {
"use strict";
const pluginName = "TextAdvanceSE"
const parameters = PluginManager.parameters(pluginName);
const seFile = (parameters);
const advanceMessage = Window_Message.prototype.isTriggered;
Window_Message.prototype.isTriggered = function(){
AudioManager.playSe(seFile);
return advanceMessage.call(this);
};
})();
/*:
@target MZ
@plugindesc Plays a Sound Effect when the text box window is advanced or closed.
@param seFile
@text SE File
@desc Sound Effect that will be played when the text box window is advanced or closed.
@require 1
@type file
@dir audio/se
@Default Cursor1
*/
// PLUGIN CODE
(() => {
"use strict";
const pluginName = "TextAdvanceSE"
const parameters = PluginManager.parameters(pluginName);
const seFile = (parameters);
const advanceMessage = Window_Message.prototype.isTriggered;
Window_Message.prototype.isTriggered = function(){
AudioManager.playSe(seFile);
return advanceMessage.call(this);
};
})();
Apologize for the novice question and thanks in advance 🙂