Open this page at https://juliekol.github.io/pxt-levels/
This extension adds support for multiple levels in your game. For example, in a platformer, one tilemap will display the first level. When the player beats this level, we would move to the next level that will be displayed using a different tilemap.
-
Each level is designated using an integer. The first level is 1.
-
For every level you support, you must add the
on start level
block. If your game has three levels, you must add three such blocks, one for each level. -
The best practice is to add the block
start level 1
in theon start
block of your game.
This repository can be added as an extension in MakeCode.
- open https://arcade.makecode.com/
- click on New Project
- click on Extensions under the gearwheel menu
- search for https://github.com/juliekol/pxt-levels and import
Contains the blocks that should run when level N is started. You must add such a block for every level you support.
Makes the game change the current level to N.
Makes the game increase the current level by 1 and start it.
Makes the game restart the current level.
To edit this repository in MakeCode.
- open https://arcade.makecode.com/
- click on Import then click on Import URL
- paste https://github.com/juliekol/pxt-levels and click import
- for PXT/arcade