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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

How can I overwrite interface function?

I don't understand how I can overwrite an interface function. I can implement an interface function (from an interface blueprint) with an event. But how do you overwrite the function like in the UE4 documentation. Does the documentation mean that you should implement the interface function with an event in a Parent class and then overwrite the function in the child class?:

ttps://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/Types/Interface/UsingInterfaces/

Product Version: Not Selected
Tags:
more ▼

asked Apr 08 '14 at 04:43 AM in Blueprint Scripting

avatar image

OccultArt
48 7 16 15

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

3 answers: sort voted first

It depends on return value, void tends to create custom event (in reliable manner with specified category) rather than interface function to override

more ▼

answered Jun 16 '14 at 11:36 PM

avatar image

Sh.Tac.
1

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

I don't understand the UE4 documentation on this issue. Implementing a Blueprint interface with an event? Implementing a blueprint Interface in a Child class with overwriting the function?

more ▼

answered Apr 09 '14 at 06:54 AM

avatar image

OccultArt
48 7 16 15

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

Another Blueprint must implement your interface. Suppose that you want to call Get Health on your Character Blueprint anywhere. Then your Character Blueprint must implement an interface that has a Get Health function. Assuming that you've successfully created an interface blueprint earlier, open the Character Blueprint. Click on the Blueprint Props button in the toolbar In the Details->Interface tab add the interface that implements the Get Health function. Now back in the My Blueprint tab you'll see that Get Health has appeared under Interfaces. Double click this function. Assuming that your character has a Health variable you can connect this variable to the ReturnNode.

Now whenever you need to access the health of your character, you can add a Get Health node in any Blueprint with target input Get Player Pawn

more ▼

answered Apr 11 '14 at 09:52 AM

avatar image

simmania
185 27 37 120

(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