- From the previous exercise, you were able to make your sprite move around.
- He seems more like he is flying, however.
- Let's make your robot smarter!
Bot Builders : Program Your Robot
Create your own block
- First, let's make your robot animate.
- Normally, we'd add
next costumeto each If block, but that would be too tedious! Good thing, there's a better way to solve it!
- We can make our own custom block which will do the code blocks attached every time it's used.
define stepto make your own custom block.
- Now, you can code
step ::/ customand use it to make your robot walk.
move (5) stepsand next costumeto define step.
move (5) stepsinside each of the If blocks with step ::/ custom.
- Try making your robot move around and see what happens.
- Don't forget to click the green flag first!