Hello all,
I am working on this project and I saw an example of one just like it. I need someone to make this block code to where there are levels. If you do it I will ensure that you are credited and recommend you to others, thanks!
Hello all,
I am working on this project and I saw an example of one just like it. I need someone to make this block code to where there are levels. If you do it I will ensure that you are credited and recommend you to others, thanks!
Make something like this and fit it to your game. Make a variable called âcurrent levelâ set it to zero on start, then set it to change by one once you reach the end of the level. The create a function called âstartLevelâ and add the if statement grid you see below.
The game over at the end will make it so that once you beat the final level youâll actually win the game. Also ignore the status bar part if youâre not using the status bar extention.
I hope you find this useful.
Also i absolutely love your amazing art in game. Also since your game is a shooter, you can make it âon game updateâ once the player reaches a certain score call âstartLevelâ and change level by one.
thank you! love the community here.
I have some questions though, hopefully it doesnât bother you, what block would I use to set the current level to zero, and what do you have in the tilemap that I should put, I canât see it that well.
im trying to figure out when the player reaches a certain score i call startlevel function and change it by 1 because now, anytime when the player presses any button and releases it, it shows the win sign.
yay it worked, when I added math to a if statement on a game update and called the function âstartLevelâ and then changed the current level to 1, when it reaches 250, it wins the game, i want it to switch levels instead.
So what i think you can do is you can set it to when it reaches 250 you change levels and then to reach the next level you need to reach 500 or something like that. I honestly donât know how to do that since iâve never used a score count to tell when to change levels. Since your game has enemies coming down from the top, what i have in the tilemap isnât that important, what you could probably do though is to change the background a bit and splash some text saying âLevel 2 Startâ or something along those lines. If you need more help on the whole level changing thing there are tutorials on Makecode Arcade youtube channel that could help you with that.
I think the issue that since your score is equal to 250 for a prolonged period of time it keeps changing your level by 1 until you get to the else condition in your startLevel function.
A simple fix would just be resetting the score at each level or adding some bonus points for completing a level to get you below or above your level switch point condition.
absolutely will try the splash text instead of tile map cause afterall it isnt a platformer
yes, that was another problem i ran into. Since it is equal to 250 it will change by 1. if you go above 250 it will do nothing. i actually colored the tiles on the if sequence different colors to see the change in levels and it went past all of the levels automatically which isnt want I want, thanks for the fix. Ill get back to you once im done.
@FlintAsher and @timber. There really was no reset score so I âset score to 0.â Brilliant. I also added text to signify the change in levels. I want to thank the both of you! I might have other questions later.