Help with a Hunger System

Hello everyone!

I’ve been playing around with making a hunger system. I currently have a system in place that depletes a variable called Hunger over time, and when that variable is empty it causes damage to the player. Now, I was able to create a simple healing item just now and it was so easy thanks to the Damage system in UE4. I simply had my character take -30 damage just like in the Blueprint HUD example in the starter content. I would like to do something similar for the Hunger variable I have, however I can’t seem to use the Damage system to help here. My thought was I could use DamageTypes but that doesn’t seem to do what I want. I was hoping to apply damage as a type that would then let me separate damage to my Hunger from damage to my Health.

So what would be the simplest way to achieve what I’m looking to do? Would “Function Interfaces” help out here? What event should I trigger the “health damage” on, since I can’t use “Any Damage Taken” as my event?

Hi man ,
you have a variable Hunger , and i think a variable Life too … ok?
you have already an event or action that when hunger is empty damages the player. True?
You have an healing item , that heal your life. (using the damage system)
Now you want to "heal " the hunger with another item , but you dont know how interact with your Hunger Variable. ok?

If i get it right, is really simple.
Add to your player/charactter/whatever a “Custom Event” and rename it “Hunger-Healer” , now be sure to compile and save.
Use this custom event and do something like GET - Hunger (+ float) and Set Hunger again. Put a value in the + Float to add it to Hunger. ( FLOAT or INTEGER )

Now , how did you used the Other item?
you used overlap system? a pick up action?
do it again for your new item and use it to call your new custom event, adding the node CALL- HUNGER_HEALER