Floating Damage Display

Some small mechanics I like in games especially fighting and brawler games are being able to see how much actual damage you do plus the health of enemies.

This is something I think the player should be able to select and change. So couple blueprints and widgets I worked on this week are

Floating Damage Text:

This is when you or your enemies take damage and it pops up above you.

So creating the basic functionality for this function was fairly straight forward.

I Started by creating a widget (FloatingDamageWidget)
Inside FloatingDamageWidget, I deleted the canvas and created a sizebox with Text.
Created a Variable: Float (FloatDamage) and a Variable: ActorReference, both exposed on spawn and editable checked.
You will also notice I made a variable for the color too. this is for switching the colors depending on healing or taking damage.

FloatingDamageWidget: Event Graph
in the event graph, we basically on EventConstruct create a delay for .5 seconds before we remove it from the viewport.

Event Tick:
We get the player reference location and set visibility and position on the screen.

We also create two Bindings/Functions are also created. first to get and set the damage which is bound to text and second to change the color depending on whether good or bad damage. good resulting in Green and Bad damage in Red obviously.


Character Actor:
Across in the character actor, we add the creation and set location of the Floating Damage Text. as you can see I have also done a small animation to the text to make it float up


And that should about do it for the moment with  FloatingDamage Text. once again I’m just learning to throw things to together so I think there is probably a much better way. if you do know send a comment or need to ask any questions please don’t hesitate.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s