Do do this activity you will need to open the game you have been working on for the last two activities: Platform Movement and Jumping
|
|
Create a Ladder Sprite and ObjectMake a ladder sprite. You can do this by using one of the blocks from the breakout library and rotating it. Make a ladder object. The ladder object should not be solid. Add the ladder into your room.
|
Problem: The Ladder is in Front of the ManIf the man goes behind the ladder, you can fix it easily by opening the objPerson properties and giving it a depth of -10. This has the effect of putting the person in front of all other objects.
|
|
|
|
Turn off Gravity When Touching the LadderAs soon as the character contacts the ladder, it should no longer be affected by gravity and it should be able to climb up and down. Open the person object and its step event.
|
|
|
Enable ClimbingNow we need to enable climbing on the ladder. To the Up keyboard event, add in the following actions: Check if there is an objLadder at (0,0) relative. If the position (0, -3) relative is free, then jump to it. (The position (0, -3) relative is 3 pixels above the player)
|
|
|
Enable Climbing DownTo climb down the ladder, add in a keyboard down key event. Put in the same actions as for the Up key, but use coordinates (0,3) instead. |
Now Design Your RoomsNow you just need to work on designing a room for your character to move in. You should place platforms that are possible to jump to. You need to make sure it is not too easy, but not too hard. The levels should get more difficult the further through the game you go. |
|
| Download a basic example of a finished platform game. |



If there is an object of type ladder at (0,0) Relative (means
the person is touching the ladder), Set the gravity to be 0
and the vertical speed to be 0. Note how you
need to use grouping blocks
to make 2 things happen if the character is touching the ladder.

