How do I add to a float variable between blueprints?

Hello and sorry to post another question about blueprint interfaces. I’ve read them as well as having read the documentation and have tried many different things, but cannot get this to work.

I’m trying to set up an object, on overlap, to add to an existing variable on my character blueprint. In this case I have a simple hunger system on the char blueprint and a blueprint class with the object set to disappear on overlap. I want it to also add +10 to the hunger variable on my character blueprint.

I’m just not sure what to do with the interface blueprint. I’ve tried many different things and reading the other posts on answer hub only leads to more questions!

How do i do this?

You don’t need to use interfaces, you can just cast + cast will also filter class of overlaping actor.

OVerlap even has OTher output which is object that trigger event, it will be Actor class so you will need to use “Cast to YourCharacterClass” to turn it to your character cast. Now to Set/Get varables from external object, you need to grab a object pin and drop it on empty space, in context menu check “Variable” category and you should see Set and Get nodes. Also keep in mind that varables you want to use need to be public.

It’s alive! Thank you much kind sir, it works perfectly. The character cast was what i needed :slight_smile: