Problem comunicating variable from one blueprint to another

You could cast to your character bp.

Try and separate things up a bit more. In order to do a cast to character you have to be able to access that node. Would it be possible to use a trigger volume instead of begin cursor over? A trigger volume would have the other actor variable that you can drag off and use to do a cast to character?

Once you’ve done that, you could use a custom event in the character bp, that you access from Food_PH? That might help in spreading things out a bit- just looking at your bp’s it looks like you’re accessing the hunger value almost at the same time as setting it.

Hello,

I’m trying to send the variable Hunger from my character blueprint to my actor blueprint ( food ) to calculate food value + hunger but i’m getting an error i don’t understand.

8298-screenshot_1.png

What am i doing wrong? any other way to do it?

ok I think the problem is youre not casting to the character youre trying to reference it.from your charref pull off the wire then add casttoxxxxchar.

After taking a break and cleaning my head, i managed to solve this my self, for those who will have the same problem, this is how i fixed it:

Instead of using Reference variables i got a player character node, cast to my character and got the variable from there.

yup, indeed that was the problem, thanks for the answer :slight_smile:

Good stuff, glad you sorted it :slight_smile: