Hxrl Posted March 1 Posted March 1 Hi, I have a scenario where I would like the player to die no-matter-what. Player#die(DamageSource dmgSrc) seemed like the obvious solution, but I couldn't for the life of me figure out why my custom damage source's death message wasn't displaying (I originally had DamageSource.GENERIC as a placeholder). Then I realised that it didn't matter what DamageSource I put, #die always gave the generic death message. The next most obvious solution is to just hurt the player for a ridiculous amount of damage that bypasses armor, invulnerability, and magic, but that doesn't feel very neat. I was wondering if anyone had any suggestions on a better way. In a modded environment one doesn't always know what ridiculous things have been done with the player's health, so it's hard to know what level of silliness the damage number should possess. I'll leave it with the hurt solution in the mean time. Quote
vemerion Posted March 2 Posted March 2 8 hours ago, Hxrl said: #die always gave the generic death message You have to call CombatTracker.recordDamage() before you call die(). 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.