Creating The Boss Fight! (Part 3: The Sentry’s Setup)

Today I’ll be making the two Sentries spawn in the same way I made the Shield Generators spawn in yesterday’s post. The Sentries will not spin around the Boss like the Generators do, but will attack the player with pretty strong attacks instead.

Today’s Objective: Write a new script to spawn the two Sentries in the same way as the Generators, but without spinning.

The new “BossSentryManager” script is almost identical to yesterday’sBossGeneratorManager” script, so I won’t show repeated code.

Basically, same as the Generator spawning, I use variables to control the amount and 360-degree angular spawning of a number of “Sentry” prefabs. Unlike the Generators, these do not rotate around the Boss, so the Update() only checks if the Sentries have been destroyed or not.

The result:

Yes, I have changed the sprite art for the parts
For anyone wondering why I bothered making the spawn amounts dynamic: Dynamic difficulty!


I’ll add health to each of the Generators, Sentries, and the Main Body, so that they can be destroyed by the player.

In the days after that, I’ll be adding functional guns to all parts, animating the Boss to move around the screen, and creating some powerful attacks that the Boss will make.

Check back soon to read those posts!



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
Vincent Taylor

Vincent Taylor

Unity game developer / C# Programmer / Gamer. Australian (Tasmanian) indie games developer for 10+ years. Currently looking for games industry employment.