Defined Sound Variables

HonestInnocence

Villager
Member
Joined
Sep 30, 2015
Messages
13
Reaction score
16
First Language
English
Primarily Uses
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. 
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,932
Reaction score
13,569
First Language
English
Primarily Uses
RMMV
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?
 

HonestInnocence

Villager
Member
Joined
Sep 30, 2015
Messages
13
Reaction score
16
First Language
English
Primarily Uses
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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

X[ oh gawd.... I dropped my super expensive laptop on my hard tile floor! It still comes on and all, but now Im worried its gunna start screwing up in the near future.... I hope not, cant afford to replace stuff like that. :(
I wrote a nice animated preloading system for mv+mz today. It only supports graphic assets atm, should it support audio too? See it in action in my recent minigame @
I posted my first commercial game on the forums, and now waiting for approval.
fingers crossed.
TMW the air quality is so bad, your hair changes color every time you wash it. :LZYyuck:
Finished two animations today. :kaojoy:

Forum statistics

Threads
103,002
Messages
996,645
Members
134,484
Latest member
Gesonel
Top