[Question] How to make the DamageDisplaySettings node show +100 when taking -100 healing damage?

I tried attaching the script to Node2D, or to the VariableSettings and DamageDisplaySettings nodes, but it didn’t work.
Please add a feature to the VariableSettings node so that when taken_damage is -1, the DamageDisplaySettings node can change the prefix from [–] to [+]

I made something for you:
BazFloatingTextAction.gd (42.7 KB)

From what I’ve found the native damage display can’t do it. The minus sign on negative damage comes from the engine side of the damage display and there’s no setting to flip it for heals.

So I built a small custom action for exactly this case. It’s called BazFloatingTextAction, I’m testing it now and I’ll share the file and a demo soon. It’s a single .gd file you drop into your project’s custom_actions/ folder. That’s it, it then shows up in the Add Action dialog under Display.

For your healing item, in the visual script at the same point where you apply the negative damage, add the Floating Text action:

  • Display Text = +{amount} and the {amount} part gets replaced with the actual number. BBCode works too, for example [wave]+{amount}[/wave].
  • Amount Source = wherever your heal amount lives: a constant you type in, a variable on the object, a project variable, or a database cell. There’s also No Amount for plain text like MISS.
  • Absolute Value = ON. This is the key part for your case, a heal stored as -100 displays as 100, so with the + in the template you get +100.
  • Target Mode = This Object (the popup appears over the item running the action) or Specified Object (pick any object scene, for example your player).

Then there are the cosmetic settings: font, size, color, outline, an anchor plus pixel offset for where it spawns, and rise distance, duration, and fade for the motion.

Each trigger spawns its own independent popup that rises, fades, and deletes itself. So grabbing five potions in a row just stacks five popups, nothing breaks. I hope this can help!

1 Like

Thank you! :heart: :heart: I’ll go test it out.