Want to add a greater element of randomness to Mr. Sonny's seminal game Build Brawl Break? Turns out you can, with just a few easy steps.
Since there are a lot of different functions at work within Build Brawl Break, let's laser-focus on just one: the "spawnEnemies" function.
You'll need to identify the number block that Mr. Sonny uses to determine how many enemies spawn:
And replace it with a variable, set at the top of the function, that carries a random value.
All in all, it should look something like this:
Your last step is to change the send message text to tell you how many enemies you have to defeat. The current text looks like this:
No longer will we be brawling with three enemies each time! Now, we're going to be brawling with however many enemies our random number generator spits out. Delete the "3" in the first text block, add a new slot to the Create Text With block using the gearbox, and slot your recently-created variable in the new slot.
Now try doing the other two challenges, and showing off your code in the comments below!