Im attempting to make a detailed damage system that displays on the dark figure in featured below in the viewport.
Basically, I’m attempting to make it so that damage that affects my player character will be shown on the figure in the viewport (the more damaged, the redder it appears), as well as showing organ and skeletal damage, showing missing limbs, and detailed info on the part when you click on it.
However I don’t really know where to start for a system like this, so any pointers or suggestion to how this would work would be greatly appreciated. I’ll give more info if needed.
Hey! I’ve always wanted to do something similar, so cool to see it actually being implemented. I’d start with modifying your gun to detect exactly where the target is hit. I’d have a custom health module in all players which the gun can access to relay information to the target. When the target it hit, the gun tells the module exactly where the target was hit, how much damage it’s going to do, etc. etc. and then store that information. You can then use a connection, or repeated loop to check when your character is damaged and access that information inside the UI.
For checking skeletal & organ damage, I just calculated how likely it would be to hit an organ if you were shot randomly somewhere on the human torso (80-90% chance if shot directly forward from what I remember) and then did a lottery (so generate random number, if its between 1-9 it hit an organ, if its 10 it didn’t in that case) to determine if it hit a organ. To show the organ/skeletal damage it’s really up to you on how you want to display it. Maybe a billboard frame with an X, just deleting the UI’s arm, lot’s of different ways to go about it.
For the detailed info, again depends on how you want to go about it. You’d have to look into how to implement clicking on parts in a viewport as I’m pretty sure click detectors don’t work in them.
As for the redder it appears, you could delete the mesh texture on the UI in the viewport and then update the colour of it, or update the viewports lighting. Really up to you on that one.
This seems like some pretty a promising direction, whilst I’m not currently at my computer as of now, when I get back on studio I’ll try and follow your steps.
However when certain specifics arise I’ll be sure to pop a question back to the thread if that isn’t too much of a bother.
Anyway thanks for your advice!
Alright So far I was able to make a pretty rudimentary limb damage system, it only works with the torso and head because I used a stock gun from the toolbox to test the system out, but once I tweak the gun to work with this new system, I’ll get to connecting the viewport model show, to the damage my character is taking. Any changes I should do so far?