# Working flashlight

**URL:** <https://forum.makecode.com/t/working-flashlight/5577>\
**Category:** Help\
**Created:** [January 15, 2021, 11:25pm UTC](https://forum.makecode.com/t/working-flashlight/5577 "2021-01-15T23:25:44Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Purp13](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/purp13/32/3765_2.png) [@Purp13](https://forum.makecode.com/u/Purp13)\
**Post date:** [January 15, 2021, 11:25pm UTC](https://forum.makecode.com/t/working-flashlight/5577/1 "2021-01-15T23:25:44Z")

</div>

Can you make a flashlight that actually works

---

<div class="post-metadata">

**Author:** ![omnisImperium](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/omnisimperium/32/2728_2.png) [@omnisImperium](https://forum.makecode.com/u/omnisImperium)\
**Post date:** [January 15, 2021, 11:51pm UTC](https://forum.makecode.com/t/working-flashlight/5577/2 "2021-01-15T23:51:03Z")

</div>

You can use the shaders extension (riknoll/arcade-shaders). First create a flashlight sprite and make everything else black. Next, create a shader in the shape of a flashlight beam. On A (or any other) button pressed, if the light beam is visible, set the invisible flag to true and vice versa

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [January 15, 2021, 11:51pm UTC](https://forum.makecode.com/t/working-flashlight/5577/3 "2021-01-15T23:51:17Z")

</div>

Well, you could just the screen to be white for it to be in real life 😉

You can also use @felixtsu’s lantern extension:

> [@Hope this ext can bring some light(s)](https://forum.makecode.com/t/hope-this-ext-can-bring-some-light-s/3229):
>
> [Screen-Recording-2020-08-25-at-1] [Screen-Recording-2020-08-25-at-1 (1)] With a little bit of modification to @richard’s [pxt-lantern](https://github.com/riknoll/pxt-lantern), this extension brings multiple light source. A demo project is here The breathing effect in the original ext is not supported yet.

* * *

**SHAMELESS SELF PROMOTION**  
I have curated a list of extensions, which you can find [here](https://github.com/UnsignedArduino/Awesome-Arcade-Extensions).

---

<div class="post-metadata">

**Author:** ![Purp13](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/purp13/32/3765_2.png) [@Purp13](https://forum.makecode.com/u/Purp13)\
**Post date:** [January 16, 2021, 3:07am UTC](https://forum.makecode.com/t/working-flashlight/5577/4 "2021-01-16T03:07:25Z")

</div>

I cant get into github my parents blocked it is there another way i can get it

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [January 16, 2021, 4:50am UTC](https://forum.makecode.com/t/working-flashlight/5577/5 "2021-01-16T04:50:18Z")

</div>

Hmmmm…why would someone block _GitHub?_ What’s wrong with it?

If you click `Advanced` and then `Extensions`:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/5/5bda6f0dded474c92b416e9e5c32af0773a67656.png)  
It should bring up this:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/a/acf45d7f560764cd3791a22f0c5d208777cb1eed.png)  
Paste in the GitHub URL here:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/2/2e4ae9a079fab8417c9cb10f3209da7f0c5e8d6b.png)  
If it fails, you are going to have to find a way to access GitHub.

---

<div class="post-metadata">

**Author:** ![omnisImperium](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/omnisimperium/32/2728_2.png) [@omnisImperium](https://forum.makecode.com/u/omnisImperium)\
**Post date:** [January 16, 2021, 4:49pm UTC](https://forum.makecode.com/t/working-flashlight/5577/6 "2021-01-16T16:49:42Z")

</div>

I do not want to motivate you to do anything against your parents wishes/concerns, but there is a way you can access github. You can open an incognito tab in chrome, go to [forum.makecode.com](http://forum.makecode.com) and find this topic. Next click on UnsignedArduino’s link to his github list. You should be able to access it. If you have a chromebook, login as a guest and do the same if the previous method fails.

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [January 16, 2021, 6:34pm UTC](https://forum.makecode.com/t/working-flashlight/5577/7 "2021-01-16T18:34:39Z")

</div>

If his/her parents block the website network-wide, then that method is useless.

---

<div class="post-metadata">

**Author:** ![felixtsu](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/felixtsu/32/12024_2.png) [@felixtsu](https://forum.makecode.com/u/felixtsu)\
**Post date:** [January 26, 2021, 5:05pm UTC](https://forum.makecode.com/t/working-flashlight/5577/8 "2021-01-26T17:05:55Z")

</div>

Something like this?

 ![Screen-Recording-2021-01-26-at-6](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/d/debeb01afcd9cfd1ec7160ab1451b4d4c00067fe.gif)

---

<div class="post-metadata">

**Author:** ![ggiscool](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/ggiscool/32/3431_2.png) [@ggiscool](https://forum.makecode.com/u/ggiscool)\
**Post date:** [January 26, 2021, 6:31pm UTC](https://forum.makecode.com/t/working-flashlight/5577/9 "2021-01-26T18:31:27Z")

</div>

how u make dat

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [January 26, 2021, 6:45pm UTC](https://forum.makecode.com/t/working-flashlight/5577/10 "2021-01-26T18:45:41Z")

</div>

Now all you have to do is set the flashlight beam distance to 16 and you have a working horror game!

---

<div class="post-metadata">

**Author:** ![ggiscool](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/ggiscool/32/3431_2.png) [@ggiscool](https://forum.makecode.com/u/ggiscool)\
**Post date:** [January 26, 2021, 7:14pm UTC](https://forum.makecode.com/t/working-flashlight/5577/11 "2021-01-26T19:14:42Z")

</div>

“clap,clap,clap”

---

<div class="post-metadata">

**Author:** ![felixtsu](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/felixtsu/32/12024_2.png) [@felixtsu](https://forum.makecode.com/u/felixtsu)\
**Post date:** [January 27, 2021, 4:04am UTC](https://forum.makecode.com/t/working-flashlight/5577/12 "2021-01-27T04:04:52Z")

</div>

Added to this ext

> **[felixtsu/pxt-lantern](https://github.com/felixtsu/pxt-lantern/)**
>
> A lantern effect for MakeCode Arcade. Contribute to felixtsu/pxt-lantern development by creating an account on GitHub.

Demo project:

> **[MultiLightSource.Demo](https://arcade.makecode.com/21540-58145-08131-93414)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![Purp13](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/purp13/32/3765_2.png) [@Purp13](https://forum.makecode.com/u/Purp13)\
**Post date:** [January 27, 2021, 4:58am UTC](https://forum.makecode.com/t/working-flashlight/5577/13 "2021-01-27T04:58:17Z")

</div>

The file might help sense im on an ipad

---

<div class="post-metadata">

**Author:** ![Awesomefreez](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/awesomefreez/32/24832_2.png) [@Awesomefreez](https://forum.makecode.com/u/Awesomefreez)\
**Post date:** [March 27, 2024, 5:29pm UTC](https://forum.makecode.com/t/working-flashlight/5577/14 "2024-03-27T17:29:06Z")

</div>

doesn’t work
