Project RBH DevLog 0126 (Patreon)
Content
I don’t remember if I ever mentioned this, but I haven’t actually gotten around to finalizing the knockback system as part of the bullets. That is to say, the knockback force I apply is a constant, and cannot be upgraded. Furthermore, there’s a glitch in the system that sometimes causes enemies to take infinite knockback, sliding away from you like their planet needs them. Amusing, yes, but not exactly what I’m going for.
The first fix was easy; I just went into the script where I config all the bullet variables, slapped in knockback force as a new variable, and made sure the knockback enemy state called that variable. A clever little workaround that means I don’t have to pass as many variables through the damage script.
As for the glitch, I think I’ve solved it, but I’ll have to test more to be sure. What I think happens is that the enemy state machine reset—the thing that makes enemies go back to doing what they were doing before they got knocked back—is reading that their previous state is also the knockback state, creating an infinite loop of flying into space. So I set up a quick if statement that changes it to their neutral state if that is the case. Of course, if the glitch persists, then we’ll have real issues.
Until Next Devlog!
-DeusVerve
DevLogs like these are brought to you by Patron(s) like Haelerin!