Help - Search - Members - Calendar
Full Version: [Eventing]Creating a Radio or a Codec
RPG RPG Revolution Forums > Game Engines > RPG Maker XP Discussion > RPG Maker XP Tutorials
IgaGilgamesh
Creating Radios/Codecs

What you need:
-1 Common Event
-1 Variable, 2 if you want random speech
-Conditional Branches

First, go into your Common Events and make a new event, name it Radio, or whatever your device is.

Then, create a Conditional Branch, to see if the key "A", Z on your keyboard, is pressed.

Under that, Have text saying something like:
You turn on your radio, please select your radio channel.

Next, make a Number Input, 4 Digits(or however many you want), and store as a new variable, I called it Radio Channel.

After that, Conditional Branch, if Radio Channel is equal to 1074, then show text:
Channel 1074, Adventuring Music Network!

Then, you can have it play a BGM. For this, you should probably do the whole "memorize BGM" to make it so if you turn your radio off, there isn't any sound anymore.


Then, another Conditional Branch. Let's try a Comedy Network. If Radio Channel is equal to 2487, then show text:
Channel 2487, Comedy Everyday!

New Variable, Random Joke: Random # 1-4.

Conditional Branch, if Random Joke is equal to 1, then show text:
"What did the banana say to the apple?"
"Doesn't matter, kill yourself"

under the "else", if Random Joke is equal to 2, then show text:
"What did the Priest say to the Rabbi?"
"Your Jew's untied!"

under the "else", if Random Joke is equal to 3, then show text:
"In Soviet Russia, RPG makes you!"

under the "else", if Random Joke is equal to 4, then show text:
"So a guy walks into a bar, and...... er.... Aw crap, I forgot the line...."

Under next "else", show the message:
"Invalid Radio Channel"


And now a message to someone, or you!
Conditional Branch, if Radio Channel is equal to 0942, then show text:
Hey Snake. Snake? Snake? SNAAAAAAAKE!!!!!!


Here's what it should look like:









And that's pretty much it. Fairly basic, so you could add effects like advanced messages(dependant on the weather, time of day, randomized, etc. I believe another tutorial has that covered). For a Codec, you could have it so when you press the "A" key, it shows a picture of the Metal Gear Solid codec screen, and show pictures of different people for each channel, the number of the channel, etc.
elfyelf
Sounds preety cool, I had an old one, but mine was cheaper, dry.gif
I would of tried it except mines more like in the past.
jens009
You might want to do something so that the player can listen to the radio while still exploring the area. Or, you can keep it as is. It's just a suggestion.

Good job nonetheless. I'd probably try it out as a mini game for my game. Like find the right station or something

Thanks for your input.
IgaGilgamesh
It should keep playing while you're still exploring the area.
jens009
QUOTE (IgaGilgamesh @ Jan 4 2008, 08:25 PM) *
It should keep playing while you're still exploring the area.

I meant that the player would still be able to move.

I haven't completely check the code yet, but did you enable it to do that?
IgaGilgamesh
Yeah, you turn on the music, and it plays, then you can walk around while it plays.

Unless you mean to let the player walk around while he's typing in the channel and stuff, then no, I don't know how to do that.
HeroOfHyla
Quick idea: For the jokes, you could make them images instead of text in boxes so that you could tell them to display whenever, even when the player is moving.
IgaGilgamesh
You'know, I was thinking about that last night. And it could even be on a timer, so every couple seconds it'll show another one.
jens009
QUOTE (HeroOfHyla @ Jan 4 2008, 10:14 PM) *
Quick idea: For the jokes, you could make them images instead of text in boxes so that you could tell them to display whenever, even when the player is moving.

That was what I was trying to comment on. It seems you've stated it better than I had. Good solution too.
QUOTE (IgaGilgamesh @ Jan 5 2008, 11:04 AM) *
You'know, I was thinking about that last night. And it could even be on a timer, so every couple seconds it'll show another one.

Nice thinking. Update anytime soon?
IgaGilgamesh
Maybe, I'm a really lazy guy, I try not to do too much.
jens009
That's quite funny because your first post was very detailed and had images. Usually when I submit a tutorial I just leave the code and hope that they figure it out. Quite the irony don't you think?

It's quite simple.
Instead of:
CODE
under the "else", if Random Joke is equal to 4, then show text:
"So a guy walks into a bar, and...... er.... Aw crap, I forgot the line...."

you can put:
CODE
>>Else
>>>If Variable: Random Joke = 4
>>>>Show Picture: 4 (Bar Joke) [xy][opacity][etc.]
>>>>Show Picture: 4 (Bar Joke) (Set opacity to 0 and Frames to take to 100)[xy][etc]
>>>>Wait:100 frames (5 seconds ussually)
>>>>Erase picture: 4
onidsouza
Bringing back the old guard

Can i be banned for this?
beelzibub
This is kinda cool, however it seems like it could be problematic while walking around having messages and what not pop-up. It would be cooler if they were pre-recorded or something i know that's alot extra but it would be cool but i'm not taking anything away from what you have created, this is cool. I'm just giving you some ideas.
defilerzero
This might be something I might put into something I'm planning. <___<

Nice tutorial.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.