Download

Actor BP to Character BP communication issue

Hi all,

I’ve been struggling with something that might be quite easy to do…
I tried to look into the forum to see if anything could answer my questions, sorry if it has already been posted here.

In my Character BP (1st person view), I implemented a system that let the player use a sprint while moving, by holding a key.
What I’d like to do is having this Sprint input being enabled when the player reaches a certain point in my level.

I tried the following:

1/ create an actor BP that contains a box collision.
2/ put this actor BP with this box collision at the place I’d like the Sprint to be enabled.
3/ in this Actor BP’ event graph, I hooked a new bool variable, casted to the Character BP.
4/ if the player overlaps this box collision, the sprint input gets enabled.

Now here is the issue…

In my Character BP, I wanted to have a Branch node that is checking if the bool variable created in the actor BP is true.
If true, the Sprint input gets enabled.

In order to do so, I tried to access the bool variable but wasn’t able to find a way to do that properly…
I tried to plug a Cast to Actor BP node to it but not working…

Any ideas on this?

Sorry for the lengthy post, and thank you in advance!

Do you tried, just simply change “key” variable direct? From Actor BP Overlap event change “key” variable in Character BP.

Hi sarram,

Thanks for the reply!

Sorry but what do you mean by changing key variable direct?

You can from one BP(class) set different BP(class) variables.
32c8ad0367249586157cb2d7af0f799a5673e18f.png

Thanks!

Is that need to be set up in the Character BP?

So you can set that bool variable in Character BP, using actor BP.
Example3.png

@Fouinoo

I made a little tutorial/showcase, how you can set it up in your way.

https://youtube.com/watch?v=ApIXRBI_o1E

Hope it’s helpful :).

sarram, thank you very much for your help, it worked!

Cheers!

Hi DarkGodsLair,

Thank you very much for taking the time to make this video! Great stuff!!
It’s much more clear to me now. :slight_smile: Thank you!!