Blueprint communication casting

Hey Community,

I have a question regarding blueprint interaction ( yes I saw the videos and read the documentary :slight_smile: )
Basically I have a Blueprint which is a gate, which goes down after pressing a key. This works.
The other Blueprint is a button, which you can push by pressing a key. At the end of the actions I cast to a custom event I created in the gate BP to reverse the timeline and open it ( I tried it with an other event than the custom one e.g an other keypress and it worked ) The problem is it casts finally now but the cast fails and the events doesnt get triggered. The rest is pretty much self explaining in the picture.

Button BP

Gate BP

Thx for taking your time.

This is a common mistake i guess.

Did you ever set the Variable you are casting from to something or is it empty?

A variable of your Blueprint type is just a placeholder for the real actor. So as long as you don’t fill it somehow, you have an empty variable or better a NULL variable. You can’t cast from nothing, so you first need to set this variable to your specific actor.

If you have both actors (button and gate) in your scene, you can just select the Button inside your scene and look into the details panel at the right side. You can fill the variable with this gate by using the drop downmenu and selecting the spawned gate.

Be sure to set your variable to “editable” in the variable settings inside the button blueprint or otherwise i won’t appear in the details tab.

Ah thank you mate :slight_smile:

Both are in the scene but using the dropdown menue with the editable variable worked!
I already guessed something doesn’t get adressed right but already checked so many options…it’s a really nasty bug.

Anyway thank you!