Week 7 – Unity 3D Basics: Collect the missing objects

For the game I created I wanted to implement the timer script in order to have the player look around for objects scattered across the terrain in a certain amount of time. If the player fails to find all the objects in time then a text will pop up saying “You didn’t find the objects in time!” However, if they do find the objects in time then a text will pop up displaying “You found them all!”

  • I started with figuring out how to display the time script for the countdown.
  • Then I scripted the objects to disappear after the player collided with them.
  • I just used spheres as placeholders for the meantime and decided to put a glow effect around them in order for the player to see them easier and stand out from the terrain.
  • Next, I scattered the objects across the terrain and felt that five of them was a good amount for now.
  • Last I wanted to display text on the screen for a win or lose so I coded the scripts to work together so when all objects are collected in time the player would win. However, if the time ran out first then the player would lose.
  • I tested it for a while to see how much time I needed to give the player in order for it to be possible to collect all the objects but I still wanted them to have a sense of urgency so there is not too much time.

Github link: https://github.com/williamv22/MTEC3230.git