2D Shooter: MultiShot Powerup

Sabrina Windsor
2 min readAug 24, 2021

Objective: Create a new powerup that when activated, sends out multiple lasers in different directions.

First we need to make the prefab for the multi-shot. I just used the lasers and grouped them under an empty object, recolored them, and moved them around until I got something like this:

Now we need to make a collectible. I made mine look like this:

Assign the collectible to the powerup array in the spawn manager and give it a collider component, rigidbody component, and the powerup script where it will also need an ID. For me it was 5.

Now it’s time to spawn. I don’t want this one spawning as often as the other collectibles, so I’m making a new random.range command that will act as a probability of this spawning.

In the powerup script lets make the case for it.

And in the player script we’ll treat it like how we did with the triple shot.

Now we have a working multishot!

--

--

Sabrina Windsor

Currently learning to code with the help of GamedevHQ in order to someday my my game ideas come to life!