{(set: $Commands to (a: (a: "Hello player. Want to play a game like no other?"), (a:"First you need to BUY it. Then you need to OPEN it. And then... we shall PLAY..."), (a: "Complete the BUY action to continue."))) (set: $program to 1) (set: $t to 0) } { (set: $typewriterText to $Commands's ($program)'s (1)) (set: $typewriterPos to 1) |typewriterOutput>[] (live: 0.2s)[ (append: ?typewriterOutput)[(print: $typewriterText's $typewriterPos)] (set: $typewriterPos to it + 1) (if: $typewriterPos is $typewriterText's length + 1)[ (stop:)(show:?input1)] ] } (align:"=><=")[= (live: 2s)[ (text-rotate-x:(random: -45,45))+(text-rotate-y:(random: -45,45))+(text-rotate-z:(random: -90,90))[(text-style:"fade-in-out")[(text-style:"bold","italic","blur","expand","tall")[(size: (random: 3,8))[(either: "Why?", "Who?", "What?", "How?", "Where?", "When?","Which?","Whom?")]]]] ] (set: $name to (prompt: [Your name, please:], "", "Don't care", "Confirm")) (set: $text to "Hello "+ $name) (print:"Hello $name") (input: bind $command) (link-rerun:"Enter")[(set: $enter to true)(live:1s)[(set: $enter to false)(stop:)]] (live:0.01s)[ (if: $command is "say: *hello world*" and $enter)[(print: "hello world")] ] (set: $t to 1) (live: 1s)[(set:$t to it + 1)] |command)[(display: "typewriter")] |Yes)[[(link-rerun: "Yes")[(track: 'yes', 'play') (replace:?command)[(display: "typewriter")] (hide:?Yes)]]] |OK)[[(link-rerun: "OK")[(track: 'laugh', 'play') (replace:?command)[(display: "typewriter")] (hide:?OK)]]] (live: 1s)[ (show: ?command) (set: $len to $Commands's ($program)'s (1)'s length + 1) (if: $typewriterPos is $len)[ (set: $program to it + 1) (if: $program is 2)[(show: ?Yes)] (if: $program is 3)[(show: ?OK)(stop:)] ] ](link-repeat: "play track 1")[(track: 't1', 'play')] (link-repeat: "fade in track 1")[(track: 't1', 'fadein',5)] (link-repeat: "fade out track 1")[(track: 't1', 'fadeout',5)] (link-repeat: "fade out track 1")[(track: 't1', 'fadeout',5)] (link-repeat: "fade to half vol")[(track: 't1', 'fadeto', 3, 0.1)] (link-repeat: "stop track 1")[(track: 't1', 'stop')] (link-repeat: "play track 2")[(track: 't2', 'play')] (link-repeat: "stop track 2")[(track: 't2', 'stop')] (track: 't4', 'loop', true) (link-repeat: "loop track 4")[(track: 't4', 'play')] (link-repeat: "stop track 4")[(track: 't4', 'stop')] (link-repeat: "pause track 4")[(track: 't4', 'pause')] (link-repeat: "stop all tracks")[(masteraudio: 'stopall')]playtime: ./audio/playtime.mp3 laugh: ./audio/laugh.mp3 yes: ./audio/yes.wav amb: ./audio/ambience.mp3 no: ./audio/nooo.wav cheers: ./audio/cheering.mp3 knob1: ./audio/knob.wav creek1: ./audio/creek1.mp3 echo1: ./audio/echo1.mp3 mirror: ./audio/Mirror.mp3 melody: ./audio/Improv3.mp3 gno1: ./audio/Satie-gno1.mp3 gno3: ./audio/Satie-gno3.mp3 mystery: ./audio/mirrors.mp3 flip: ./audio/pageflip.mp3 showControls: false preload: true volumeDisplay: false startingVol: 0.7<!-- Play Track --> <!-- Set Volume to 1 --> (masteraudio: 'volume', 1) (set: $makeCake to (confirm: "Go down the rabbit's hole?", "", "Yes")) (track: 'playtime', 'play','loop', true) (track: 'playtime', 'playwhenpossible') (go-to:"MAIN")(live: 2s)[(go-to: "Main")](set: $CODE to (prompt: "Now OPEN it and type the unique code printed inside:", "", "", "Confirm")) (if: $CODE is "trtmslx1029")[(go-to:"PLAY")] (else:)[ (track: 'no', 'play') (go-to:"TRY AGAIN") ](track: 'cheers', 'play') (confirm: "Code is Valid", "", "PLAY") (go-to: "INSTRUCTIONS") (confirm: "The Code is Invalid", "", "TRY AGAIN?") (track: 'laugh', 'play') (go-to:"PASSCODE")|command)[(display: "typewriter")] |Yes)[(confirm: "Sure you do...", "", "YES") (track: 'yes', 'play') (replace:?command)[(display: "typewriter")] (hide:?Yes)] |OK)[ (set: $buy to (confirm: "Did you buy it yet?", "Yes", "No")) (if: $buy is "Yes")[(track: 'yes', 'play')(go-to:"PASSCODE") ] (else:)[(track: 'no', 'play')[ (confirm: "Well... What are you waiting for?", "", "Ok, I bought it")(track: 'cheers', 'play') (go-to: "PASSCODE") ]]] (live: 1s)[ (show: ?command) (set: $len to $Commands's ($program)'s (1)'s length + 1) (if: $typewriterPos is $len)[ (set: $program to it + 1) (if: $program is 2)[(show: ?Yes)] (if: $program is 3)[(show: ?OK)(stop:)] ] ](track: 'amb', 'play','loop', true) Let the Game begin!(set:$batteryPower to 100)(meter: bind $batteryPower, 100, "X", "Battery Power: $batteryPower", (gradient: 90, 0, red, 1, orange)) (live: 1mS)[(set: $batteryPower to it -1) (if: $batteryPower is 0)[GAME OVER (stop:)] ]