Save-Point
Musical Menu Script - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Archives (https://www.save-point.org/forum-105.html)
+--- Forum: Creation Asylum Archives (https://www.save-point.org/forum-90.html)
+---- Forum: Scripts & Code Snippets (https://www.save-point.org/forum-92.html)
+----- Forum: RPG Maker VX Code (https://www.save-point.org/forum-101.html)
+----- Thread: Musical Menu Script (/thread-7046.html)



Musical Menu Script - Meg - 09-06-2008

This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.


This is my first RGSS 2 script. Yes, it is incredibly simple; yes, it's probably been done before, and; yes, a retarded monkey shoving a banana in his eye could script this.*

Musical Menu Script

One day, I was making a game with RMVX when suddenly I remembered the music that played when you opened up the menu in Legend of Dragoon. I decided that I wanted that simple, meaningless feature to be in my game. So I pulled up the RMVX help file and searched through existing scripts for reference, and voila!

Description
When you open the menu, the audio file specified plays. When you close the menu, the map music plays.

Customization
Not only can you change the audio file, but you can change the volume and pitch of it too! Observe:

Code:
# Customize the menu here.
$mm_name = "Town1"    #File must be found in the directory Audio/BGM/.
$mm_volume = 100      #Default 100
$mm_pitch = 100       #Default 100

$mm_name is the name of the file, which (as noted) must be in the BGM directory.
$mm_volume is the volume of the music. The highest volume is 100, and the lowest is 0.
$mm_pitch is the pitch of the music. The highest pitch is 150, and the lowest is 50.

Also, you can change the features IN GAME. Simply create an event, press "Script..." and type in the part of the script provided in the code box above.

Script
Open up the Script Editor and insert a new script under "Materials." Name it whatever you want. Then copy and paste the script provided below.

"The Amazingly Awesome (NOT) Script Itself!"


Compatibility
This script is designed to work with the standard-issue menu graciously provided by Enterbrain. Minor modification is needed to make it work with any custom menu system. If necessary, PM me and I can apply this to your CMS. But I doubt it'll be necessary.

* No insult is meant to people who are not retarded monkeys shoving bananas in their eyes who believe they cannot script. This statement was purely meant for lame, self-deprecating humor. Have a nice day.