How to change the level based on score then overload and score

I’m try to figure out how to get my game change the map and tile when you get certain score or overlap the flag. There are plants in first level, when the hero overlap the plants goes up by 1, then second level need to collect bottle and when get certain point the gate will open for player to finish and third level is the same with second.
Please Help me
The link of the game: https://arcade.makecode.com/S66470-23868-57707-59036

1 Like

First off, if you want to get points from each power plant ONCE, there’s no need to have a variable for each one! You can simply change the power plant’s sprite kind when you interact with it or check for the power plant’s image in your IF statement.

For the tilemap changing depending on score, it seems you’re changing the wrong variable. Instead of “levelCount” which represents your Total number of levels, you should change your “currentLevel” variable!

Now for placing the player and the bottles, you’ll have to select a spawn tile for the player in this code:

And make a similar function to create and spawn bottles around the level. (PS: You can use a repeat block to make multiple sprites without requiring multiple functions!).

If you’re still struggling, I recommend you give the skill maps in MakeCode Arcade’s home page a try!
This one seems like a close match to what you’re working on!