[09:24][09:25] <ShadowTiger> You could make a global script that would take in variables from the totally separately scripted ocarina item, which, upon use, would let you use all eight buttons (Left, right, up, down, L, R, A, and B.) to play the Ocarina notes,
[09:25] <ShadowTiger> using Enter to stop,
[09:25] <ShadowTiger> and the notes that you play would be recorded to certain variables within a script.
[09:26] <ShadowTiger> Each time you'd play the Ocarina, it'd set a primary, opening variable to 1, indicating the new play session with the Ocarina.
[09:26] <ShadowTiger> then the six or eight notes that you'd play would be documented in individual variables within the script as booleans.
[09:27] <ShadowTiger> Then it'd pass those variables to the global script, and it'd check to see if they're the right notes in the right sequence,
[09:27] <ShadowTiger> and if they are, it'd activate the screen's secrets or something after you hit enter.
So. To reiterate:
- There would be a global script which would do the following:
- Take in the sequence of notes that you just played from the Ocarina script.
- Check the list of allowable songs to see if you've learned the song that you just played or not.
- Pass it back to the screen that you're allowed to reap the rewards from playing the song.
- There would be an Ocarina Script which would perform the following actions:
- When you use the Ocarina, it'd enter the script. Pressing Enter again would leave the script and put away the ocarina, and if you chose to change Link's graphics to Link playing the Ocarina, it'd revert his tiles. This means storing his LTM data for this purpose.
- The script will utilize the Playsound data to allow the Left, Right, Up, Down, L, and R buttons to play Ocarina notes. (Though I believe there are only five notes, but whatever.)
- Each note you play will be stored in eight different variables. If you play more than eight, it will have to perform the task of remembering only the most recent eight notes, which implies that it'll have to bump the contents of each variable down to its predecessor on each successive note after the eighth. That'd be the part I'm sure we'd be dreading. Or, if worse comes to worse, we could just end the ocarina session prematurely at the eighth note, preventing a ninth.
- It would then pass the contents of the eight variables into the Global Script. I just hope that we have enough variable holder capacity. I really don't know.
- A screen script which would do the following:
- Would first take in ZQuester user input to request an appropriate song. We could pre-script songs in there in the form of variables acting as the order and kind of the notes played, and allow them to simply input the number of the song, or, we could actually state the number (1 = A, 2 = B, etc.) of the note in the order you must play them in. I'm not sure how this will work with the interaction of the global script checking the song for validity or not though, since it's more on-the-spot.
- Could probably also state the actual spaces you must occupy to achieve the desired results from playing the song. Could be four values to be within, like the four coordinates of the corners of a rectangle, or, could even be two values, being two opposite corners of a rectangle and assuming the other two points by mathematically completing the rectangle within the script itself.
- So when the correct notes are played, it'll trigger the screen's secrets, or any other effect that you'd like.
- I'm really not sure how multiple songs being played on the same screen would work though.