Stickman Elevators

25 Jan, 2013

Henry Angeles writes:

I'm not a programmer, so when my kid asked me to make an elevator in the stickman game I totally failed. I can get the platform to move up and down, but when the elevator starts going up with the stickman on it, hilarity ensues.

I guess at the end of the day i'm asking how this can be done. Thanks for your time.

I'm not surprised you found it difficult. It caused a fair amount of head scratching until I realised the trick to getting this working. If you used the code for the horizontal platforms in PythonForKidsSolutions.pdf as the basis for your elevator, your stick figure probably slips through the platform as soon as he touches it (or potentially rockets off up the screen depending upon your code). The elevator moves at a different speed to the stick figure, so you need to match that speed when the figure lands on the platform - and you can't rely on the basic collision detection code as it's written in that example.

A new programming puzzle, for this, has been added to the puzzles page - check back in a week or two for the full solution.