Tower Defense Tutorial – Brackeys – Ep. 10

February 3, 2019

Tower Defense Tutorial

Episode 10 – Missile

Youtube – How to make a Tower Defense Game (E10 MISSILES) – Unity Tutorial

By: Brackeys
Ep. 10

This tutorial focused on the missile prefabs for the missile launcher object. There was a heavy focus on effects and visuals, but there were still some additional gameplay elements added to the Bullet scripts of the missiles specifically.

For the interesting gameplay of the missiles, a Physics.OverlapSphere was added so they could find other nearby gameObjects within a determined explosionRadius and damage those objects as well. This OverlapSphere puts all the colliders it finds into an array, which is then dealt with by a foreach loop.

We created a new particle effect for the missile. I still don’t quite understand the new nested prefab QoL changes in Unity, but I did create a nested prefab for this effect. The main effect was the debris falling apart, similar to the bullet. The child effect were flames, which were orange cubes that floated up. Finally we also added a point light that very quickly fades out. The fade out was done with the Animation window by recording and simply starting with the desired initial intensity, then reducing the intensity to 0 at a later time stamp.

SUMMARY

  • If you have a visual model that isn’t on the axes you want for any reason, just call it “Graphics” or “GFX”, and put it as a child to what you will consider the true gameObject to interact with and align that properly by rotating the new GFX/Graphics element
  • Look into particle effects, there are a lot of options
  • Look into nested prefabs in Unity 2018.3+
  • Physics.Overlap sphere is useful to find collidable gameObjects around a location