Damage Numbers after damage

I would like damage numbers to pop up above an enemies head to tell you how much damage you did to the enemy, this will add player awareness and feedback for when a shot connects, this also lets players learn enemy health values and weapon versatility a bit better, i would like to implement it with my already existing damage system: heres what my game looks like at the moment
Here’s the project link: PlayCanvas | HTML5 Game Engine

does anyone even know how to do this?

It’s not something that’s easy to answer.

Which part of it do you have trouble with?

all i want to do, is when an entity takes damage, display a number in a random location above their head with that damage amount

Here are some steps of how I would do this.

  1. Add a child entity with a text element component
  2. Make sure by script this entity is always looking at the camera
  3. Update the text element with the value of the damage
  4. Enable and disable the entity by script
1 Like

There’s this, but I think the project needs an update to the tween library to work. But as an inspiration: Damage deal number plugin


i’ve already taken a look at that, it seems that it broke somehow as when i launch that project is doesnt work and it gives me a lot of error messages

Here is the project with an updated tween script.


damn, this is a very long script. as this seems like a much more difficult and complex task than i intended then i will be likely to come back to this much later in the development process, especially since i do not understand the Tween functionalities in any way

Agree. If you want to start simple you can look at my steps above.