The RPG Maker Resource Kit

RMRK RPG Maker Creation => Requests => Script Request => Topic started by: theneonheart on September 26, 2012, 04:31:51 AM

Title: Need Script: have player click event (a boombox) to change music (playlist)
Post by: theneonheart on September 26, 2012, 04:31:51 AM
Basically, the game I am making all takes place at a house party, and I want to have realism regarding the way the music changes. And I don't even know how to change to the next song when the first song finishes. But I'd also like to change the music to another track if the player is tired of a song (I have a long playlist of songs) by clicking on a boombox and choosing 'change music' or whatever.

Is there an easy way to event this, or could someone make a 'boombox script' for me? I'd really appreciate it, and definitely give you credit in the game.
Title: Re: Need Script: have player click event (a boombox) to change music (playlist)
Post by: Otaku000 on October 13, 2012, 02:20:34 AM
You should look for a script called simple mouse script system (if i find back the link i'll post it). It allows you make an event start by directly clicking on it. So we have the "boombox". To make it run without a script, you can try to use a variable. Depending on the variable value the event will start a different song (by the way with song you mean bgm??).
There is probably a way to code it in an event even in an easier way but it's time for to o to bed so i'll think about it tomorrow with fresh mind :) Hope that this helps for now XD
Title: Re: Need Script: have player click event (a boombox) to change music (playlist)
Post by: theneonheart on October 13, 2012, 01:04:17 PM
Thanks for responding. By the way, I didn't mean 'click' like mouse click. I mean an event, where you hit the action button, 'enter' for instance' and a dialogue comes up that says 'Change music?' and you have a choice, 'yes' or 'no'. Or maybe a few different 'radio stations' to choose from like some games have.
Title: Re: Need Script: have player click event (a boombox) to change music (playlist)
Post by: QuantifiedIllusions on October 14, 2012, 05:06:43 PM
Hey there, if all you are trying to do is make an event that lets the user dynamically change the music it is actually really simple.

Spoiler for:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi1284.photobucket.com%2Falbums%2Fa580%2FQuantifiedIllusions%2FBoomBox_Example_zpsa7a93e2c.jpg&hash=4057d9136309e6f8b90c849665be56d65c0bcc6d)

If you follow the example above, just give them a first choice option (the first red circle) that asks if they want to change the music. Once they select yes, you can then give them a list of all the songs they can change to.

If instead you wanted it to be a random song that can be easily done too in a similar style,

Spoiler for:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi1284.photobucket.com%2Falbums%2Fa580%2FQuantifiedIllusions%2FBoomBox_Example_4_zpsadf2ff03.jpg&hash=aa509c62c7c3fba0b2a7651770489901b9b22e86)

As above, you set a random variable and then simply do a series of conditional branches that check against the values of the variables and play the declared song.

Spoiler for:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi1284.photobucket.com%2Falbums%2Fa580%2FQuantifiedIllusions%2FBoombox_Example_3_zpsce3b3361.jpg&hash=ca60925e528e271933ea1149f32d8dc744e17f68)

The above images shows how you would set the random variable, simply go to "Control Variable" and select random and your range.

(This was done in VX, if your using Ace I'd imagine it would be very similar, but if your having any more problems, or I didn't understand what you needed, then I'll try to help further after you post again.)

<Alex>
Title: Re: Need Script: have player click event (a boombox) to change music (playlist)
Post by: Otaku000 on November 11, 2012, 12:06:08 PM
QuantifiedIllusions wrote down just what i ment XD
Title: Re: Need Script: have player click event (a boombox) to change music (playlist)
Post by: theneonheart on November 11, 2012, 11:15:50 PM
Thanks. I'll try it out. It looks like it'll work to me.