x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Can't override nor call c++ functions with BP

I'm trying to override some c++ functions with BP but they don't even show up.

EDIT: Okay, I found the problem. It turns out that you need to put BlueprintCallable on the UFUNCTION parameters. Like UFUNCTION(BlueprintImplementableEvent, Category = "Inventory InGameUI") void OnAddContainer(int32 containerItemID);. Thanks!

InventoryMainWidget class is child from CommonWidget class that is child from UUserWidget

InventoryMainWidget.h

 public: 
     UFUNCTION(BlueprintImplementableEvent, Category = "Inventory InGameUI")
     void OnAddContainer(int32 containerItemID);
 
     UFUNCTION(BlueprintImplementableEvent, Category = "Inventory InGameUI")
     void EquipWearable(int32 wearableItemID);
 
     UFUNCTION(BlueprintImplementableEvent, Category = "Inventory InGameUI")
     void AddItemSlot(int32 itemID);

alt text

Thanks in advance!

Product Version: UE 4.12
Tags:
override bp1.png (253.3 kB)
more ▼

asked Aug 30 '16 at 03:46 PM in C++ Programming

avatar image

ItsaMeTuni
234 19 14 19

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hey ItsaMeTuni-

For the functions you're using, rather than searching for them in the override dropdown, you can simply right click in the event graph and create an event node for the given functions.

alt text

Cheers

Doug Wilson

functioncalls.png (48.6 kB)
more ▼

answered Aug 30 '16 at 04:25 PM

avatar image ItsaMeTuni Aug 30 '16 at 05:01 PM

it doesn't appear on the list when I right click

avatar image Doug E ♦♦ STAFF Aug 30 '16 at 06:37 PM

After creating the widget blueprint in the editor, did you reset it's parent to your custom class? You can do this by going to File in the widget blueprint and selecting Reparent Blueprint. This should allow the functions to appear in the right click menu as well as in the Overrides drop down.

avatar image ItsaMeTuni Aug 30 '16 at 07:11 PM

Nope. Didn't work.

avatar image Doug E ♦♦ STAFF Aug 30 '16 at 07:22 PM

Can you provide context on what didn't work? What is the parent class for the class you added your code to? Can you explain what you've done so far and where the problem is occurring?

avatar image ItsaMeTuni Aug 30 '16 at 07:29 PM

I can't find the override neither the event from the c++ function in the widget BP graph. I've alredy reset the widget's parent class (wich is the c++ class InventoryMainWidget). InventoryMainWidget is derived from the CommonWidget class that is derived from unreal's UUserWidget class.

avatar image ItsaMeTuni Aug 30 '16 at 07:50 PM

I found what the problem was. Just see the edit I made. Thanks Doug!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question