How do I access a blueprint from another?

Hi, I’m fairly new and trying to resolve the following blueprint issue

I have a blueprint named button and a blueprint named ramp.
When I initiate a Event in Button blueprint I want to call the event in ramp blueprint.
I can’t seem to figure how to do this, any help will be appreciated

This is my Ramp blueprint

This is my button bp

This is my button bp with a variable to ramp bp

image

Thank you in advance

Doing this properly involves using a blueprint interface.

Create a new blueprint Interface class.
In the interface class, create a new Function and add any relevant variables necessary for the event.
Under “class settings” in the receiving blueprint (the one with the event), add the created interface.
In the receiving blueprint, add Function event to the event graph and implement the blueprint “code”.
In the calling blueprint (the one with the input event), add a Function (Message) node.

Hey there @GaraLastik! Welcome to the community! So there multiple means of communicating between blueprints. The most common methods are direct communication, event dispatchers, interfaces, and casting.

In your case you are using direct communication, in which you have a reference directly to the actor and call functions or events directly on the actor itself. As long as that reference is correct, this would be fine except your button is likely not receiving your input. That said I agree with Draix that an interface would be better for this (and all interactions handled under the same button), as well as better for learning. Leaving both the documentation for blueprint communications below so you can look into the others and a tutorial for how to implement the interact interface, though this tutorial is a door instead of a ramp but the same method applies.

Disclaimer: One or more of these links are unaffiliated with Epic Games. Epic Games is not liable for anything that may occur outside of this Unreal Engine domain. Please exercise your best judgment when following links outside of the forums.

Hi Guys, it’s me again sorry to be a bother.
I’ve added the Blueprint Interface and added the bp_Ramp as a variable but I still seem to be getting an error.

I’m not quite sure what’s happening or if my logic is not logicing

image

If you are using the interface method, the “On Move” method should be “FUNCTION NAME (Message)” where FUNCTION NAME is the name of the function created inside the blueprint interface.

Hi I’ve now got this but it still doesn’t seem to be working

There should be a node that has “(Message)” at the end. You may have to uncheck the context box in some cases, usually when the function is overridden, which it shouldn’t be.