Skip to content

Instantly share code, notes, and snippets.

@elliotthall
Created September 11, 2024 15:29
Show Gist options
  • Select an option

  • Save elliotthall/306f195ae704c68d1b03a32e99fbdf58 to your computer and use it in GitHub Desktop.

Select an option

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
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