Making A Custom Bullet Hell-style Attack System (Part 1)
I want to upgrade the shooting mechanic for both players and enemies, so I’ll be making a “Bullet Hell”-style system today. This will be a multi-part post.
Today’s Objective: Upgrade the shooting mechanic by creating a basic Bullet Hell-style shooting script.
Create a new script:
Now create an empty Update() and SpawnProjectiles() function.
Leave this script for now, and create another new script called “ProjectileAttackTemplate”.
Make it a struct instead of a class.
The purpose of this template struct is to allow predefining of attack types for easy access. i.e. You can create a ProjectAttackTemplate variable set up for a single shot forwards, then call the shoot function and pass that variable in. The same for a 20-shot radial attack.
Now back to the first script again, in Update():
And in SpawnProjectiles(), first I create some local variables:
Then make a For Loop to spawn each projectile:
Tomorrow in Part 2, I’ll be continuing this development to improve it and make some shot patterns and templates. Look forward to it, and remember to check it out!