Please show how you’re calling the functions. It seems confusing why you would organize them this way so I need to know more about the purpose for these nodes. For now, here’s my answer:
All of these redundant nodes can be optimized as follows: Create an [Enumerator] object in your [Content] panel and assign all of the {Texture} inputs to them. Then, in your blueprints, create a new [Function] or [Macro] with your new {Enumerator} and a {Boolean} called, “Negation”, as an {Input}.
{Sub Node 0} (Prep for your first node): Attach the function’s incoming ({Enumeration} variable) pin to the (Index) pin of a [Select] node. This will automatically populate the node with the {Enumeration} lines you created earlier. From there, you can connect the {Texture} references to each of the options on the [Select] node. That way, all you have to do is select the {Texture} from the drop-down box created by the function’s ({Enumerator} parameter) pin whenever you call the function. Take the (Return Value) pin from the [Select] node and connect it to the ({Texture} parameter) pin of the [Update HUDHead] node you will place, below.
-OR- You could forgo using the {Enumerator} variable and simply create a {Texture} parameter for the function and connect that pin directly to the [Update HUDHead] node’s ({Texture} parameter) pin.
Make a [Get Head Equip Image] node, like you have shown.
[[In Exec} node for your function]->[Update HUDHead] node with (Target) pin coming from your Get node and the (Texture) node pin coming from the function’s [Select] node or incoming parameter pin->(See {Sub Node 1}, below)->[Set {Health}] using the (Results) pin from {Sub Node 1} as the input
Create a [Make Literal Float] node (or another input variable of type {Float}) below the [Get {Health}] node as two separate, unconnected nodes.
{Sub Node 1}: [Get {Health}] (Float) pin->(Top pin) of [{Sub Node 2}] and (Top pin) of [{Sub Node 3}]->[Select] node with (False) pin in from [{Sub Node 2}], (True) pin in from [{Sub Node 3}], and (Index) pin in from {“Negation”} input parameter->(Return Value) pin from [Select] node connected to the (Value) pin of a [Clamp (Float)] node (leave the (Min) pin as 0.0 and set the (Max) pin as the variable for whatever the maximum health is for your character->(Return Value) pin from the [Clamp (Float)] node to the incoming (Float) pin on the [Set {Health}] node
{Sub Node 2}: [Float + Float} node with the (Float) pin from the [Get {Health}] node connected to the (Top pin) and the [Make Literal Float] node’s (Float) pin connected to the (Bottom pin)->(Return Value pin) from the [Float - Float] node connected to the (False) pin on the [Select] node
The last node is very similar, just pay attention that it’s a [Float - Foat] node and it connects to the (True) pin on the [Select] node.
{Sub Node 3}: [Float - Float} node with the (Float) pin from the [Get {Health}] node connected to the (Top pin) and the [Make Literal Float] node’s (Float) pin connected to the (Bottom pin)->(Return Value pin) from the [Float - Float] node connected to the (True) pin on the [Select] node
It’s important that your [Float - Float] pins are correct because negation laws are not commutative.
That’s the logic behind how that can be cleaned up, unless I’m mistaking its intended purpose. I’ve used words instead of pictures to explain the logic without giving the answer.
Anyway, let me know how it goes.