Home
Help
Search
Calendar
Login
Register
Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Click here to join us on IRC (#charas on irc.freenode.net)!
Charas-Project
»
Game Creation
»
Requests
»
RPG Maker Programming
»
Sound puzzles
« previous
next »
Print
Pages: [
1
]
Author
Topic: Sound puzzles (Read 1374 times)
elementalhero76
Your Ad here!
Zealot
Posts: 612
The Writer of Light
Sound puzzles
«
on:
September 19, 2006, 03:15:55 PM »
Gong puzzle
I started a puzzle where you read a sign in the dungeon and it tell you the order of touching the panels by a series of gong sounds at different pitches. Now not far from that sign are four music note panels when touched make thoes sounds. now how do i program the pattern expressed on that sign in that order in which i had it? And can anyone tell me how to make numbers appear when you mess up three times or so?
Logged
Retired RM2k3 user. Using VS2015 Pro.
Discord:LightWriterOfLegend2016#5786
Esgardum Legends wiki:
Dead. Need to pay $100/yr to stay open and editable. Debating if I want to or not.
Esgardum Series status:
RPG: World building and planning stage
Books: Still on book 1: The Four Sinners
WarxePB
Action Sue
Royal
Posts: 3,601
What killed the dinosaurs?
(No subject)
«
Reply #1 on:
September 19, 2006, 07:32:56 PM »
This would be a situation where variables would be useful. You would need to have 5 variables - Gong1, Gong2, Gong3, Gong4, and Attempts. When you activate a sound, it would check (via branches) if any of the first 4 variables were set to anything.
Code for that would look like:
<>Branch if Var[0002:Gong1] is 1 or more
|<>Branch if Var[0003:Gong2] is 1 or more
||<>Branch if Var[0004:Gong3] is 1 or more
|||<>Branch if Var[0005:Gong4] is 1 or more
||||<>(Nothing happens here)
|||<>Else Handler (Gong4)
||||<>Variable Operation: Var[0005:Gong4] Set, 1 (or whatever gong is touched)
||||<>
|||<>End
|||<>
||<>Else Handler (Gong3)
|||<>Variable Operation: Var[0004:Gong3] Set, 1
|||<>
||<>End
||<>
|<>Else Handler (Gong2)
||<>Variable Operation: Var[0003:Gong2] Set, 1
||<>
|<>End
|<>
<>Else Handler (Gong1)
|<>Variable Operation: Var[0002:Gong1] Set, 1
|<>
<>End
<>
Now, when the fourth gong is hit, it will check if it's the right order. To do this, create a Parallel Process event, with preconditions set to "Variable Gong4 is 1 - Greater or equal". The code would look something like:
<>Branch if Var[0002:Gong1] is 4
|<>Branch if Var[0003:Gong2] is 1
||<>Branch if Var[0004:Gong3] is 4
|||<>Branch if Var[0005:Gong4] is 3
||||<>You solved the puzzle. Continue on with the code here.
||||<>
In the Else handlers, use a Variable Operation to add 1 to the Attempts variable. At the end of the Parallel Process event, create a branch that checks if Attempts is 3. If it is, then do whatever you want to help the player out.
Logged
Blog:
The Gigaverse
Twitter:
Initial Chaos
Print
Pages: [
1
]
« previous
next »
Charas-Project
»
Game Creation
»
Requests
»
RPG Maker Programming
»
Sound puzzles