Charas-Project

Game Creation => Requests => Tutorials => Topic started by: lilsniffs3 on June 30, 2010, 05:35:25 AM

Title: Cool Things for Beginner's #1: CD Player or Radio
Post by: lilsniffs3 on June 30, 2010, 05:35:25 AM
Hi, I'm starting a series of short tutorials on how to do some small things that can make your game interesting. They will be all easy to understand, as long as you are a bit familiar with most of the program. I am making this as there are now few places that have RM2k3 tutorials up, since most of them closed, turned to VX and XP, or turned to crap like GamingW (which so many sites link to as a place for tutorials.)

Tutorial Number 1: How to put a radio or CD player in your game

Open the database and go into items. Create two or more items if you're making the CD player, one item if you're making the radio.

CD Player
For the CD player, name one "CD Player" and the rest the name of the CD. For this tutorial I will use one CD simply called "CD." Make "CD Player" a common item and "CD" a switch that turns on a switch. For simplicity in this tutorial, I will name it "CD." Also, under "Activation Allowed" make sure that only the "Field" box is checked, and change the "Number of Uses" to "Unlimited Use."

Now, go into the common event tab in the database. Make an event that is a Parallel Process with the "Trigger Switch" box checked and set to the "CD" switch. Put a "Conditional Branch" with the "Execute custom handler" box checked. In it, make it check if the party possesses the "CD player."

In the main part of the branch, you can do one of two things. If you want only one song to play, use "Play BGM" and select the song you want to play. After it, put If you want the player to choose a song to play a specific song, use "Message" and type in "What song would you like to play?" Then, use "Show Choices" and put all of the choices as the songs you want them to choose from. On the box to the right of the choices, put "Execute Handler." For each choice, use "Play BGM" to play that song. In the "Cancel Handler," don't put anything.

Under the "Else Handler" leftover from the "Conditional Branch," put a "Message" that says "You have nothing to play it on!" After all the commands, after the word "End," use "Switch Operations" to turn off the "CD" switch. There you have it! Your very own CD player in-game!

If you want more than one CD in-game, you have to make one "CD" switch for each and one common event for each.


Radio
Name the item "Radio" or whatever you would like. Make it a "Switch" item with "Unlimited Use" that turns on the switch "Radio," and is activated only on the field. Go to common events and make an Parallel Process event called "Radio" that triggers when switch "Radio" is on.

Here's where it can get either advanced or stay a beginner code. Because this is a beginner's tutorial, I will show you the easy, not as interesting way. If I have time, I'll make the advanced tutorial that is similar to Fallout 3's radio system.

Use "Message" and type in "What would you like to tune it to?" Then use "Show Choices" and type the name of the radio channels as choices. In the box to the right of that, check the "Execute Handler" box. Under each choice, use "Play BGM" to play the radio broadcast. After all of the commands, use "Switch Operations" to turn the switch "Radio" off. Now you have your very own radio for your game!

There you go! A tutorial on how to make either a CD Player or Radio! The next tutorial will be a "dash" button. If I did anything wrong, please say so in a reply.