Charas-Project
Game Creation => Requests => Tutorials => Topic started by: Xen on October 20, 2004, 04:25:34 PM
-
I was thinking about a new tutorial to make when I thought up this. With the following steps can play a piano in your RPG. Here's the steps to making it:
1) Create a common event and call it soemthing like 'Piano', whatever...
2) Make a new variable, call it 'Piano' or whatever...
3) Make a map event that calls the common event.
4) Put the following coding in your new common event:
<>Key Input Proc: [Piano Variable]. (This event option must only have the number keys and cancel key ticked. Same with the rest)
<>Loop
<>Branch if Var [Piano Variable] is 11
<>Play sound: C note (I'll provide sounds)
<>Key Input Proc: [Piano Variable]
:Else Handler
<>Branch if Var [Piano Variable] is 12
<>Play sound: D note (I'll provide sounds)
<>Key Input Proc: [Piano Variable]
:Else Handler
<>Branch if Var [Piano Variable] is 13
<>Play sound: E note (I'll provide sounds)
<>Key Input Proc: [Piano Variable]
:Else Handler
<>Branch if Var [Piano Variable] is 14
<>Play sound: F note (I'll provide sounds)
<>Key Input Proc: [Piano Variable]
:Else Handler
<>Branch if Var [Piano Variable] is 15
<>Play sound: G note (I'll provide sounds)
<>Key Input Proc: [Piano Variable]
:Else Handler
<>Branch if Var [Piano Variable] is 16
<>Play sound: A note (I'll provide sounds)
<>Key Input Proc: [Piano Variable]
:Else Handler
<>Branch if Var [Piano Variable] is 17
<>Play sound: B note (I'll provide sounds)
<>Key Input Proc: [Piano Variable]
:Else Handler
<>Branch if Var [Piano Variable] is 18
<>Play sound: 2nd C note (I'll provide sounds)
<>Key Input Proc: [Piano Variable]
:Else Handler
<>Branch if Var [Piano Variable] is 19 or more
<>Key Input Proc: [Piano Variable]
:Else Handler
<>Branch if Var [Piano Variable] is 10
<>Key Input Proc: [Piano Variable]
:Else Handler
<>Branch if Var [Piano Variable] is 6
<>Key Input Proc: [Piano Variable] (This Key Input MUST have everything back the way it was before the event started. I think the first 7 boxes must be ticked, depends on wht you already had it)
<>End Event Processing
One thing I'm not sure about on this is if it interferes with other stuff in your game that use the numbers too.
About the sounds, I have them so I'll provide them. If I can attach a zipped folder with them here, I'll do that. Someone please tell me if it is allowed.
-
Good, but if you have enough skill to edit that and make your own tunes, wouldn't making midi's be easier?
-
Well, I sorta see it like something from FF7 and FF8....
You can get to pianos (actually, it's an organ on FF8) and play random, stupid tunes....
Just a little something...
-
Originally posted by AsakuraHao2004
Good, but if you have enough skill to edit that and make your own tunes, wouldn't making midi's be easier?
Wha?
What are you on about? It's just pressing numbers from 0-10.
Very good tut, Xen. Thumbs up!
-
I should of mentioned that actually....
I think you press the keys 1-8 to play the notes...
And esc to go back to the game.
-
Oh.. OK, i didn't read clearly enough the 1st time.. Yeah, by using some variables and fork options I could make you get an item by playing the right notes! AWESOME!!
Edit: I want the sounds. It's fine as long as you didn't steal them from some site.
-
I made 'em myself actually...
With the help of a midi maker and midi to wav converter...
Quite simple....
I could put the sounds here in a compressed folder but I'm not sure if that's allowed...
-
Course it is! Especially if it's your own work. The only thing you have to worry about is if it's over 524288 bytes.
-
It's bigger than that....
-
Go to my site (check sig) and go to downloads page...
Damn! Freewebs has crappy download speeds....
Hmm.... _sweat_
-
Yeah, Freewebs sucks! When your sites grows bigger you'll probably have to change host. Anyway, back on topic nice tut! But the rather large sizes of the wav files ruins it a lil.
-
Yeah. The WAVs are a little too big for their contents...
OFFTOPIC: I'll probably relocate soon...
-
Nice tuto...not for noobs though. But it opens a large variety of possibilities, specially with puzzles...or, it could be the central subject of a story huh! Congrats Xen! :bend:
-
Good Job!
-
Yes, it works perfectly. ^^
Well done! :bend:
-
Well, that's good to know, that it works perfectly...
I gotta admit though, the piano sounds are shoddy...