Jump to content

Player#die(DamageSource dmgSrc) sends generic death message, is there a neat alternative?


Hxrl

Recommended Posts

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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.