Polraudio 122 Report post Posted April 7, 2009 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
0 Leon 55 Report post Posted April 7, 2009 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 Polraudio 122 Report post Posted April 7, 2009 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
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