MakeCode Games!

A fan-made community library of MakeCode Arcade games. Visit MakeCode Arcade to make a game!

← Back to extensions

Lantern

Create dark levels with dynamic lighting effects like circular lanterns, glowing torches, and directional flashlights.

toggle lighting

Problem it solves

You have multiple light sources like torches and campfires in a room, and you need to turn on the multi-light darkness system.

What this block does

Enables or disables the multi-light screen effect where several sprites can cast light into darkness at the same time.

The block

true block

Parameters

NameTypeDefaultMeaning
onbooleantrueTrue to activate darkness and multi-light rendering, false to turn it off.

Example

multilights.toggleLighting(true)

Add the extension

Add github:felixtsu/pxt-lantern to your project, or open: Import pxt-lantern.