Multiple Pages - Lakelands Computing

Title
Go to content
Using Multiple Pages of commands to change how an object acts
Sometimes in programming you want an object to act differently at different points in the program.

For example, move slowly normally  but when apple is eaten move quickly.

This is achieved by having two different sets of instructions (routines) for the object and calling the routine at the relevant point. Kodu does this using pages.

You put the different instructions on the different pages, then use the switch to page x command when you want Kodu (or another object) to switch behaviour. A good example of this is a power boost. For example when I eat the apple switch to page 2 which has instructions that let me move faster.

Here is the video demo.
All Text copyright Lakelands Academy & Mr T Purslow 2020.
All images copyright free / creative commons unless otherwise stated.
You are welcome to use under a Creative Commons Attribution-nonCommercial-ShareAlike License.
All Text copyright Lakelands Academy & Mr T Purslow 2020.  All images copyright free / creative commons unless otherwise stated. You are welcome to use under a Creative Commons Attribution-nonCommercial-ShareAlike License.
All Text copyright Lakelands Academy & Mr T Purslow 2020.  All images copyright free / creative commons unless otherwise stated. You are welcome to use under a Creative Commons Attribution-nonCommercial-ShareAlike License.
Back to content