Hi, so, I am not really good at coding.
I am actually in the middle of creating a project and am making a relationship system.
That's why I decided to make a plugin that plays a sound effect upon variable change. I tried, but nothing works in the game.
I may be able to put a sound effect every time a variable changes in the editor.
But, I was wondering if there was an easier way to do so.
Is what I am asking for possible? Or should I stick with the editor for that purpose?
Here is my test plugin :
(I put $gameSystem.saveBgm(); for testing.)
EDIT : So, I was able to do this using a parallel common event and it's working perfectly. But, I'm still interested in learning how to do this via javascript scripts/plugins.
Thanks.
I am actually in the middle of creating a project and am making a relationship system.
That's why I decided to make a plugin that plays a sound effect upon variable change. I tried, but nothing works in the game.
I may be able to put a sound effect every time a variable changes in the editor.
But, I was wondering if there was an easier way to do so.
Is what I am asking for possible? Or should I stick with the editor for that purpose?
Here is my test plugin :
JavaScript:
/*:
* @plugindesc A plugin letting you put sound effects for variable changes.
* @author Sarry
*/
var check_change;
if (check_change != $gameVariables.value(1)) {
$gameSystem.saveBgm();
check_change = $gameVariables.value(1);
}
(I put $gameSystem.saveBgm(); for testing.)
EDIT : So, I was able to do this using a parallel common event and it's working perfectly. But, I'm still interested in learning how to do this via javascript scripts/plugins.
Thanks.