Road TO Dev — Death beam

Rob Smith
Jul 30, 2021

--

Objective: Lets give the beam attack it’s own damage as it wouldn’t make sense to just work like a laser projectile.

Step 1: Give the beam a collider

Step 2: Inside the attacktwo script let’s create a new collision detection. This time we will use Trigger2dStay so it will trigger the entire time the player is colliding

Step 3: Have it call the players damage method while in this state. This will create a very deadly beam attack that will most likely kill the player upon contact

Note: The example in the GIF above is with the player having 70 lives for testing the player will most likely die just by touching that beam with regular lives

--

--

Rob Smith
Rob Smith

Written by Rob Smith

Hi there! I am currently on the path to learn how to become a unity developer and will be documenting my journey as best as I can here. Thanks for looking!

No responses yet