Frictional Games Forum (read-only)

Full Version: interesting situation, need scripx
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a cool puzzle where you read a note and its poetry about a piano key, you go to the piano, open the hatch thing, and then when you click on the piano keys it plays a little exerpt of something. you click it 4 times (each time playing a different tune) and on the fourth it makes a key become active/spawn and fall out of the bottom of the piano key area thing. and when the key comes out you look at it for a second or so and it plays the ui_sanity_gain.snt file

How would one do this? Smile
Make an area under the piano hatchcover, small enough so the player can't hit it when trying to open the hatch, or heck, lock the hatch up so it doesn't close. Make a variable, set it to 1. Set the custom focus cross hair to something that makes sense, then have an interact callback. The function for the callback would play part one of the song after checking the variable, then would increase the variable by 1. If 2, plays the second part, etc. Then on the fourth part, make your event of making the key active after a short timer, maybe the length of that fourth part sound.