Create a new world make it Creative, Flat and Peaceful
Press C to access the code window. Choose the top option - see image left. Suggest you complete the Chicken Rain tutorial before doing the tasks below:)
Please submit your answers and a code link on a website or a doc to GC
An "event" in computer science is an action or occurrence that is detected by a computer. For example, when someone clicks the button on their mouse, it generates a “mouse click event” for the computer. If we press a key it creates a key down event.
In programming, an event handler is a part of your program that runs when specific events happen (it “handles” the event). In MakeCode, these event handler blocks 'handle the event. The event might be on chat command 'flower' --> the player spawns a flower
There are examples on the right of 'Event ' blocks. The 'Event Handler' blocks are the things that can happen inside these Event blocks, see the examples below
EVENT - LEARNING GOALS: I know what an event and an event handler are. I understand there are THREE numbers in the coordinates for Minecraft
Complete the activity and the assessment task
- Look at the ideas and create an event and event handler of your own.
Can you create an event that gives you extra speed when you sneak?
You need to use 'shift' to sneak.
What other 'boosts' can you give yourself?