Making the task

Our existing game consists of a task for the player to complete in order to enter the outpost they must collect four batteries to power the door, one of which has to be won by winning the coconut shy game we added in the previous chapter.

Currently, having entered the outpost, the player is met with a sense of disappointment as there is nothing to be found inside. In this chapter, we will change that by adding a box of matches to be picked up by the player when they enter the outpost. We will then create our fire outside, which can only be lit if the player is carrying the box of matches. In this way, we can show the player a set of logs waiting to be lit, leading them to attempt to find matches by completing the tasks laid out ...

Get Unity Game Development Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.