Page cover

Return Percentage

The "Return Percentage" function can be used to return the current percentage of the ownging characters health. The percentage is calculaed using the maximal health and the current health (0% therefore means the owner is dead). The value will be returned as a float clamped between 0 - 1.


Function Return Values

The "Return Percentage" function returns the current health of the owner as a percentage value between 0 and 1. This value is mainly supposed to be used in the healthbar widget but can be used in any other way you like aswel.

  • Percentage (Float)

How to access the function

To access the "Return Percentage" function, you first need to get an instance of the RHS Component that you want to get the death state from. To do this you can use the Get Component by Class node provided by Unreal Engine / Epic Games. This node will return an instance of the RHS component as long as a valid one was found on the target actor. Consider saving the instance as a variable for later use. Now just drag and drop from the component reference and search for the "Return Percentage" function like this:

Last updated