Week 5 | Session 3 - Powerup and Countdown - April 22, 2020

Tutorial

·

Beginner

·

+10XP

·

60 mins

·

(34)

Unity Technologies

Week 5 | Session 3 - Powerup and Countdown - April 22, 2020

The enemy chases the player around the island, but the player needs a better way to defend themselves... especially if we add more enemies. In this live session, we’re going to create a powerup that gives the player a temporary strength boost, shoving away enemies that come into contact! The powerup will spawn in a random position on the island, and highlight the player with an indicator when it is picked up. The powerup indicator and the powerup itself will be represented by stylish game assets of your choice.

Languages available:

1. Overview

This is the same content covered in Lesson 4.3 in the independent Create with Code Course.

What you will make:

  • A powerup will spawn in a random position on the map. Once the player collides with this powerup, the powerup will disappear and the player will be highlighted by an indicator. The powerup will last for a certain number of seconds after pickup, granting the player super strength that blasts away enemies.

What you will learn:

  • Write informative debug messages with Concatenation and variables
  • Repeat functions with the power of IEnumerator and Coroutines
  • Use SetActive to make game objects appear and disappear from the scene

2. Before you Begin

To participate in this session and follow along, you need:

  • Unity 2018.4 installed
  • An up-to-date project open in Unity:
    • If you have followed along with us this week and have your own project ready, you are good to go!
    • You can also download the instructor's up-to-date project and import it (If you don't know how to import a project, you can read how here)

If this is your first Create with Code live learning session, you can catch up by:

  1. Following along with the recordings of our previous live learning sessions
  2. Completing the same lessons in the independent Create with Code Course

*Note - it is not necessary for you to catch up, but it is recommended for an ideal learning experience.

3. Recorded Live Session - 22nd April - 9am PST

If you missed this session, you can catch up with the video below.

4. Recorded Live Session - 22nd April - 5pm PST

If you missed this session, you can catch up with the video below.

5. Next Steps

Get caught up:

If you were not able to finish the session along with the instructors, you can catch up by:

  1. Re-watching this recorded session when it is posted in Step 3 above at 3am PT (10am UCT) the morning after this session's date
  2. Picking up where you left off in Lesson 4.3 of the independent Create with Code Course

Bonus Challenges:

  • Experiment with new features (after making a backup)

    Add another type of powerup that is randomly spawned in the game - for example:
    • [Easier] Give the player a speed boost
    • [Medium] Give player ability to launch projectiles at enemies to knock them off or something that automatically fires projectiles in all directions
    • [Difficult] Give the player ability to jump up and smash the ground, sending all nearby enemies flying away from player
  • Look ahead to the next lesson
    • If you want to go ahead and preview what we'll be covering in the next session, you can give it a try in Lesson 4.4 of the independent Create with Code Course.

Complete this tutorial