Floating damage indicator?

I am working on a custom game which uses a floating damage indicator similar to TF2 for effect. I have seen it in other custom games and I want to know how to do it. Any help? Thank you!

2 Likes

The event is ā€œplayer took damageā€ or something, and then you have access the the value ā€œevent damageā€ which you can display

You can create an in-world text above someone’s head. Use player took damage and event damage like blujay said. Don’t forget to delete them!

What this will do is when you take damage, create the number above your head, wait a few seconds, and delete the number. The number goes up when hit, and the delete timer restarts.

Set it up to where on Player Took Damage, add Event Damage to Player Variable A, add a Skip If rule, and have it skip 3 actions: Create In World Text at Position of Event Player + vector(0, 1.5, 0), and the text is the Player Variable with the damage; Wait 0.016, and Set Player Variable B to the last text ID. Skip these three if: Player Variable A !=0. Then add a shorter Wait rule for the text deletion delay, I’d recommend 3-5 seconds, and have the Wait Restart When True. After the last Wait rule, Set Player Variable A to 0.

Bit of a necro, but I’m responding since I was looking for this too for ages and it might help anyone else that needs it. I found a few lines of workshop code (not written by me) that does this function, from an aim trainer preset. I altered it just for readability (the damage text was really small, and numbers weren’t rounded to integers).
Credit to JƁYCƘ#2117.

Workshop code for damage indicators: MB93R
Updated 29th May, 2020