-
-
Save elliotthall/306f195ae704c68d1b03a32e99fbdf58 to your computer and use it in GitHub Desktop.
Snippet to show using current location in typescript for SEEK in digital ghost hunt
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 (device_id == SEEKType.GMETER){ | |
| images.iconImage(IconNames.Target).showImage(0); | |
| basic.forever(function () { | |
| if (input.buttonIsPressed(Button.A)) { | |
| currentLoc(); | |
| reading = gMeter(rooms); | |
| images.iconImage(IconNames.SmallDiamond).showImage(0) | |
| basic.pause(200); | |
| images.iconImage(IconNames.Target).showImage(0) | |
| basic.pause(200); | |
| images.iconImage(IconNames.Diamond).showImage(0) | |
| basic.pause(200); | |
| basic.clearScreen() | |
| if (reading > -1) { | |
| basic.showString("" + reading); | |
| } | |
| } | |
| basic.pause(200); | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment