Page cover

Add Health

The "Add Health" function is part of the interaction functions family and can be used to manipulate the health data inside the Replicated Health System. By executing this function, the given health amount will be added to the target RHS Component.


Important: Functions included in the interaction family directly manipulate the health data within the Replicated Health System. Since this data is replicated to all other clients in the game, interaction functions must always be called from the server side.

Function Arguments

The "Add Health" function takes two values as arguments. The "Target" argument must be an instance of the RHS Component which you want to apply damage to. The "Health" value set as a float value determines the amount of health that is added to the corresponding health system. The "Target" argument should be connected automatically once you accessed the function as explained below.

  • Target (RHS Component)

  • Health (Float)

How to access the function

To access the "Add Health" function, you first need to get an instance of the RHS Component in which you want to manipulate the health data. 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 "Add Health" function like this:

Last updated