Next came actually programming functionality into the boss. That was mostly fine, create objects by instantiating them, take damage from the player, deal damage to the player etc. The real doozy came with animations, and how to make things in the scene at the exact right moment in an animation. At the time, I settled on invoking a function after the right amount of time, but now in hindsight, what happens if the player pauses the game midway through? They get smacked with a barrel from nowhere when they unpause because that Invoke() doesn't care about the game being paused.
My first idea for a solution to this was to apply a script to the animations themselves, so I could just set states in the state machine from there at the right time, and cause certain events to happen, like the Instantiate calls. I could also find which Monster was the one throwing or spitting something at you and set its state accordingly (there can be two bosses in the arena at once, don't forget).
This is wrong. Don't do this. EVERYTHING gets messy when you do this. Keep everything to do with an instance of an AI contained in that AIs script. Make that script work for x number of an AI, and your life will be happy. It took me far too long to realise this.
Now, after we got feedback from the people that played our game at Insomnia (Thanks a whole bunch by the way!), we found that aspects of the boss fight weren't particularly great. If you got too close to the boss, you could kill it easily as it doesn't have a melee attack, and won't attempt to kill you. Also the "Dance Floor" as it's affectionately called was too unclear on what it actually does, which is damage the player if they get too close, and the split wasn't obvious at all, which led to players just getting nailed by huge metal barrels from nowhere.
And thus, the Radiation Monster fight has been redesigned into something a bit more interactive, and clear on the objectives. For now, the improvements are on the back-burner, while I work on boss number two...
Speaking of which, here's something pretty to look at!