Goals:

  • Mod a Colour Runner block

Tips

  1. Go to your Buzzy Canvas.
  2. Click on the version of Colour Runner that has your name on it – e.g “Riley Runner”, OR the default Colour Runner.
  3. Select a block to mod by opening it’s code.

The Code to Mod

For modding blocks, the only thing we need is the OnPlayerCollision part of the code.

"onPlayerCollision": {
"destroy": true,
"addPoints": 0,
"bouncePlayer": true,
"changePlayerSpeed": 0
},

How to Mod

In this section, we have four options for modding our block:

"destroy": true
This option decides whether the block is destroyed when a player hits it. When it’s true, the block gets destroyed. When it’s false, the player just passes through the block.

Important: If destroy is set to false, none of the other options will work.

"addPoints": 0

This adds points when the block is destroyed – Or removes them, when you put a minus sign in front of the number.

"bouncePlayer": false

Change whether the player gets knocked back when they hit the block. Good to set to false when you’re making blocks that give bonus points!

"changePlayerSpeed": 0

Changes how fast the player is going when they hit the block. The default speed is 10, so if you want the player to slow down, put it to a number below 10. If you want them to speed up, put to a number above 10.

Play around with different combos to make your blocks special!

Hot Tip

You might notice that unlike other Buzzy code, there aren’t “quotation marks” around the values in this code. That’s because these values are two different types of code – Called Booleans and Integers. 

Booleans can only be true or false (In lowercase!).  Putting anything else into the value will break this code.

Integers can only be whole numbers (not decimals). Putting anything else into the value will break this code.