Defined Sound Variables

Defined Sound Variables v1.0

by HonestInnocence

Introduction

As I was testing a system I'm currently working on in MV, I found that I couldn't use scripts to call sounds due to them being undefined. Thanks to Tsukihime, I learned that I could define the sound file as a variable. Following that, I found that I couldn't define the sound separate from the script call; noting that this would cause constant re-usage and limitations of a script call block in the editor. So I took to making my first script - a very simple one, where the default sound files for MV are defined.

Script

http://pastebin.com/43D4qAAq

Installation

1. Copy the script lines from pastebin into a word editor (notepad++ is one)

2. Save the file as DefinedSoundVariables.js

3. Paste the above file into your js\plugins folder.

Credit

HonestInnocence (For compiling/defining the default sounds)

Tsukihime (For code format)

Terms of Use

Free to use in any project, even commercial ones.

Author's Notes


As I delve deeper into learning JS, I hope to streamline this script to reduce on line amount, as well as make it to where each sound's attributes can be edited either globally or through parameters. 
I couldn't use scripts to call sounds due to them being undefined
Is this because of something to do with your script, or are you saying there's a bug in the engine?
Hello Shaz,

There is no error with the engine. This script was basically born from ignorance on how to properly format the script calls. By the time I found out, I had already submitted this script to this subforum, so my apologies for that.

Though this may of be of some use, stil. Especially as a first learning experience. Currently, I'm endeavoring learning how to set the attributes (volume, pitch, pan, etc) to something that could be called upon once; to cut down on the script's line amount.

Original thread: https://forums.rpgmakerweb.com/threads/defined-sound-variables.51127/