RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[REQUEST]Music box script o.o

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 84
Mama told you not to make that uu-uu noise...
Umm, I apologize if I sound like an idiot, but I was wondering if there is a script out there that lets you insert an option in the title, such as "music box" and it takes you to a screen where you can listen to the music on the game?

I guess a jukebox would be a better word for it....


But if anyone can help me, I'd be really grateful! :]
« Last Edit: April 28, 2009, 06:50:37 PM by gurevich42 »

**
Rep:
Level 83
Egg > Gnarmander > Gnarmeleon > Gnarizard
Okay, go to your script editor, and then find "Scene_Title".

Find lines 39 and 40 which should have this:
Code: [Select]
    s3 = "Exit"
    @command_window = Window_Command.new(192, [s1, s2, s3])

Replace it with this:
Code: [Select]
    s3 = "Jukebox"
    s4 = "Exit"
    @command_window = Window_Command.new(192, [s1, s2, s3, s4])
or replace "Jukebox" with "Music Box" or whatever you ultimately decide to call it.

Now scroll down to about line 100 and find this:
Code: [Select]
      when 0  # ??????
        command_new_game
      when 1  # ???????
        command_continue
      when 2  # ???????
        command_shutdown

And replace it with this:
Code: [Select]
      when 0  # ??????
        command_new_game
      when 1  # ???????
        command_continue
      when 2  #Jukebox
        command_new_game
        $game_switches[1] = true
      when 3  # ???????
        command_shutdown
NOTE: If you're using Switch #0001 already, simply change the "1" to a switch number that isn't in use.

When you're done you'll have a "Jukebox" option on the title screen, which will start a new game with Switch #0001 (or whatever you chose it to be) activated.

This is where the real work begins.

You need is to make sure your game starts with no hero graphic on a blank map with a single event.
(you'll also need a second blank map that I'll get to in a minute - may as well create a new one now)
You want your event to be on parallel process (or auto-start if you prefer).
Make a conditional branch to check if your switch (see above) is OFF.
If it's off, simply teleport the player to the starting position of the game and restore their character's graphic (if your game starts with one).
If it's on, teleport the player to the new map I'm about to tell you how to make.

This new map will be your Jukebox menu.
It's going to allow your player to listen to the music in the game, which is awesome by the way.
You'll need to make a tileset for this menu as well.
It simply needs to include 2 transparent tiles (one that will be walkable, and one that will not), and all the names and/or numbers of the songs in your game.
All you have to do is make a column of walkable tiles (as many as there are songs in the game), and surround it with unwalkable tiles,
then make an event for each song on each tile that plays the song when activated.

There you have it!
A Jukebox system!

NOTE: I'm sure there are others out there who could script an actual menu for you (like the item or skill menu is), but I'm not quite that good at scripting.

***
Rep:
Level 87
RMU Admin
I made a Jukebox system here somewhere its my first script so its not the best but i do plan on making another one with my new scripting skills.

**
Rep:
Level 84
Mama told you not to make that uu-uu noise...
thank you so much!

The menu helped me alot!!

EDIT:

Okay, I'm getting an error

" Script 'Scene_Title' line 40: SyntaxError occurred. "

It leads to the 4th selection in my script.

the "shutdown"

I renamed it Exit

o.o is there any way I can keep it named "exit"?

nevermind, I fixed it. I'm stupid:\



But I was looking for something like...a window with the names of the songs.

like this



Song Name            Length     

Song 1                  3:11
Song 2                  7:27
Song 3                  0:38
Song 4                  2:10


You know what I mean?

« Last Edit: April 28, 2009, 09:17:44 PM by gurevich42 »

**
Rep:
Level 83
Egg > Gnarmander > Gnarmeleon > Gnarizard
Yeah, unfortunately I don't really know how to go about that one.
My apologies.
I only figured out how to manipulate the script that was there.
I don't know how to call a new window.
Though if I did, I'm sure the menu would be just as simple to make as the title screen modification.
That'd be a HUGE array, though.  lol
Anyway, like I said, that's the best I can do for you, unfortunately.
It could look really good if you do it up right, but if a built-in menu that the windowskins apply to is what you were looking for, you'll have to hunt down a member who can script a CMS.
They'll know how to make a pop-up menu for your jukebox. :)

**
Rep:
Level 84
Mama told you not to make that uu-uu noise...
That's alright.

You helped me a bunch with title options O3O

Thank youuuu!!!

**
Rep:
Level 83
Egg > Gnarmander > Gnarmeleon > Gnarizard
You're very welcome. ;)
If you consider this request fulfilled, please edit your original post's subject from [REQUEST] to [Resolved].
If you'd still like to find someone who can make you a more spiffy menu, continue as you were.

**
Rep:
Level 84
Mama told you not to make that uu-uu noise...
Yeah, I still need a spiffy window D:

:\ it's one of my "top of the to-do list"...thingies..