I hope you like reading.
So I’ve simplified a lot.
This is the new damage handling system:
Notice the absence of DeathQueued and DeathPaused.
Since the death check is in tick, it will only check the next frame, after both projectiles have gone through their functions. Meaning both functions will fire even if one does enough damage to kill.
This is the new HandleProjectileToProjectileCollision:
This is the default implementation, but it is meant to be overridden.
This is the new collision handler:
Examples of how to use (Ghost, Wall, Copy):
The ghost projectile just needs an overridden AnyDamage function:
This would make it immortal except to GhostHurter damage types. Of course, ghosthurter is not nessecary, and you could just never call the parent to make it actually immortal.
If you want the ghost to also not do any damage to projectiles, you can just override the HandleProjectileToProjectileCollision function to not do anything:
The wall projectile you mentioned earlier could be done like so:
I created a custom damage type called InstantDeath and accounted for it in the damage default implementation, but you could just have a really high number that no projectile could ever take- whatever you do, don’t directly destroy them. That would cause problems.
If you wanted it to also take no damage, just override AnyDamage and have it not do anything.
Here’s how you could implement that copy projectile
The best option out of these would probably be the additive health while still take damage. Else that would be the strongest projectile in the game. With additive it has a proper counter- glass cannons. But at this point it’s more down to design.