• Homework
  • Thirds
  • Upper Thirds
  • Fourth
  • Divisions
    • ICT
    • Computer Science
  • Fifth
  • Lower Sixth
  • Upper Sixth
    • Upper Sixth Theory
  • Blog
  • Careers
  • Unity
  • Networking
computinglesson.com

Adding a platform

First draw a platform on the stage.  You need to choose a colour for the bottom of the platform.  Simply draw a coloured rectangle as the platform and then add a black line on top of the rectangle to form the surface of the plaform.  Like this:
Picture

Detecting the base of the platform

You need to add some code blocks to the hero sprite to make sure that he can't bounce up through the platform from below.  We'll put in another 'touching' test to slow down the yspeed when the hero touches the platform base colour.  That should make him bounce back off the bottom of the platform.

Once you've made this work, you can add as many platforms as you like by simply drawing them onto the stage.

Try and make them difficult to reach, but not impossible!
Picture
Powered by Create your own unique website with customizable templates.