Road TO Dev — Death beam

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

--

--

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!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
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!