Friday, 25 April 2014

Stair Puzzle

For one part of our game (when we decided to incorporate puzzle elements), the protagonist character would drop to the floor below once she passes over a certain point within the level, as the ground below her gives way. 

Her only way to escape then from this room would be to build a set of stairs out of the objects around her (boxes, barrels and crates etc.) back up to where she came from so that she could continue on and make her escape.


Above is the basic layout of the blocks (these will be the boxes and barrels etc). They then fall to the floor, which will be shown in the photo below.


In the screenshot the boxes have fallen to the floor, so that the player can now go over to them and interact with them. 


Above, the player is holding the block by clicking the left mouse button on the object, and holding it down to keep it in the air. The player can now move the block up and down as well as left and right and can move with the box when it is being held.


The player is then able to stack the blocks thus enabling them to form a set of stairs in any location they wish.


Above is a screenshot of a trigger area which will load the next level of the game. This was not necessarily going to be needed in our game, however I played around with it and as shown in the photo below it changes to a new level when they player walks in to the green box. 


Below are some screenshots of the scripts. The first screenshot is of the Pick up and Drop script.

Below is a screenshot of the script that enables the level to change once the player has entered the green box.


I found this particular exercise quite challenging, yet it was really fun once everything started to come together and work in the way that I wanted it too. 


No comments:

Post a Comment