How to access a BlueprintImplementableEvent in Level Blueprint?
I have a pickup class, with several custom events, among them:
This event shows up on any class blueprint that uses this C++ class, but it doesn't shows up on the level blueprint.
I'm trying to make some lights in the level change color when a pickup respawns or is picked up.
Hi Ixiguis, BlueprintImplementableEvent is a bit of a poor name. BlueprintImplementableEvent means that the function can be overridden in the blueprint, similar to how you can override a virtual function when you inherit a class in C++.
What you want is to define a multicast delegate property, first you need to define the delegate's type, you can define this just at the top of the header, take a look at some examples in the codebase.
Next you just declare a new property of that type on your C++ class,
Then when the event needs to fire, you'll just call OnAwesomeness.Broadcast(); in C++, to notify everyone listening that the event occurred.
Usually you'll define both the overridable function and the event delegate for outside listeners.
answered May 03 '14 at 10:48 PM
Nick Darnell ♦♦ STAFF
Custom Level Blueprint
Make a custom level blueprint so you can teach your level BP and your items to communicate in the C++ directly
or also then you can write BlueprintImplementable events in the Level BP that the items call in the C++ and you implement in the Level BP!
Solus Wiki Tutorial on Custom Level BP
Get Level BP
PS: remember to reparent your existing level BPs, and do the config thing so all levels use your custom Level BP
Encountered the same problem, my solution was easier than I though (no deal with multicast at all) :
I omitted BlueprintCallable tag in UFUNCTION declaration. Fixed it like this :
Now as soon as you have your object/actor reference, you can call the event from any blueprint as any event/function! :-)
answered Jul 09 '14 at 09:15 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here