Last active
September 23, 2016 11:49
-
-
Save milesrout/a0a23ddcd1b229addd421527e27772f6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; If you look at this you'll get wrecked. | |
(register-event concrete-block event-type-player-look | |
(lambda (ev) | |
(cause-effect | |
#:type 'explosion | |
#:at (event-triggering-object ev) | |
#:radius 100))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Set up a dialogue box that will pop up congratulating you every | |
; time you level up. | |
(define congrats-dialogue | |
(dialogue | |
#:capture-focus #t | |
#:modal #t)) | |
(register-event congrats-dialogue event-player-level-up | |
(lambda (ev this) | |
(add-textbox this | |
(textbox (format "Congratulations on reaching level %" | |
(lookup 'level ev)))) | |
(clear-buttons this) | |
(add-button this #:label "OK" | |
(lambda (click) | |
(close-dialogue this))) | |
(show-dialogue this))) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment