I looked at it and I still have the same issue.
I am not knowing how to look for the lowest variable value from the family objects.
Check for 1.
Check for 2.
Check for 3.
To get the value I need, I have to divide two variables.
The max hp the objects has/ the current amount of hp.
200/100 is 0.5
The results range from 0.0001 to 1000.
I would like this to only have to calculate when an object is targeted.
Having it calculate every X seconds causes a lot of useless calculations.
I think the only way to do this without setting up to many variables is by using an Array.
I can use the objects UID to track in an Array and do the math required as needed.
This will only return one value at a time, but I can set that value to a single instance variable.
This is better than creating X amount of variables in case X amount of objects are in Line of Sight.
I am hoping there is a more simple solution then this.
The question still remains, how do I select the lowest variable without checking every single possible value.