start lantern effect
Problem it solves
You are making a spooky dungeon game and want the screen to be pitch black except for a glowing circle of light centered on the player.
What this block does
Turns on the single-lantern darkness effect and anchors the glowing circle of light to follow a specified sprite.
The block
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
| anchor | Sprite | mySprite | The sprite that the center of the lantern light will follow. |
Example
let player = sprites.create(img`.`, SpriteKind.Player) controller.moveSprite(player) lantern.startLanternEffect(player)
Add the extension
Add github:felixtsu/pxt-lantern to your project, or open: Import pxt-lantern.