How To Call A Function From Level Blueprint To Be Used In Class Blueprint?
I am curious as to how to call a function from level blueprint, in a class blueprint? Usually I simply use Blueprint Comms... but I cannot make the level blueprint a variable to reference. I saw the event dispatcher, but not sure if this would work. I was hoping to somehow just call the functions in my level blueprint I already created.
Any advice would be appreciated, thanks
asked May 10 '14 at 08:51 PM in Blueprint Scripting
An event dispatcher would be the best way to go. You create the dispatcher in your class blueprint that resides within the level.
Name it whatever you like.. I named mine Say Hi!
First, create an event that will "fire" when you want to call your level function. For me, I just used a component over lap, so when the player walks in to it, it executes on the level. After that, drag the dispatcher out on to the graph and use the "Call" option.
Now, drop your blueprint in to the level and keep it selected. Open the level blueprint, right click, and start typing the name of your event dispatcher. It should pop up.
Finally, just drag a wire to your function in the level graph.
Follow this question
Once you sign in you will be able to subscribe for any updates here