Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
Sign in to follow this  
Polraudio

[XP]Playing BGM In Script

Question

I was just trying to make a new jukebox for my game and i ran into a problem. I want to be able to go through the music by index like $bgm.play.track[1] or something like that. The player in RMXP already has it in order from a-z.

 

If you need more info just ask.

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

To do it that way, it will take a lot of work. Why not ust alias Game_Party, add array 'tracks', add an accessor to get to it, and put all the names of the music files in there? Sort of like this:

 

class Game_Party
 alias leon_jukeboxexample_gameparty_init initialize
 attr_accessor :tracks

 def initialize
leon_jukeboxexample_gameparty_init
@tracks = [] #Put music tracks here.
 end
end

 

Then, you can call up the array in a window, sort it, then draw the names of each one. This uses a global variable already in place, so you do not have to create a new global class. This saves a lot of time, a touch of lag, and is real simple this way.

 

Hope this helps.

Share this post


Link to post
Share on other sites
  • 0

I used this way before and it didn't turn out so well. I for got to mention i need it to automatically. So when i use something like this $bgm.play.track[1] it will play the 1st music in the folder.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...