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"

Overriding a Function in Blueprints

Hello,

I have a Blueprint called "BP_Projectile", and it contains a function called "HitTarget". I made a new blueprint called "BP_Projectile_Pistol" that inherits from "BP_Projectile", and I would like to override the "HitTarget" function, but I'm not sure how.

What I've done so far is simply create a new function in "BP_Projectile_Pistol" and try to rename it "HitTarget", but I then get an error that reads, "HitTarget is already in use by another variable or function!" Is overriding even possible, and if so how can I do it?

Product Version: Not Selected
Tags:
more ▼

asked Apr 12 '14 at 12:07 AM in Blueprint Scripting

avatar image

NickJVaccaro
36 1 5 8

avatar image The Barn Apr 30 '14 at 10:40 AM

I'm having this same problem. Is there an option to show inherited functions?

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

2 answers: sort voted first

I found the answer in another post:

The issue here is that functions which have no outputs are actually considered events! You can find their overrides in the normal event graph "Add Event" menu, and add a call to their parent function by right clicking on that added event. We're working on making it so that functions will always appear as functions, regardless of whether or not they have outputs, but in the meantime, that's the distinguishing factor. Sorry for the confusion!

more ▼

answered Apr 30 '14 at 10:46 AM

avatar image

The Barn
151 3 8 17

avatar image JanSordid Feb 01 '15 at 12:29 PM

In 4.6.1 this has still not changed, although the workaround still works too.

Is there any further developments on this?

Its still not intuitively solvable, without finding this answer here.

Edit: Sorry, I did not want to uncheck this answer by commenting on it.

avatar image daniele_niero May 17 '15 at 10:29 AM

As for UE4.7 now the functions are listed correctly even if they haven't any output, but we can't still able to override them. Is there a good reason for this strange behaviour? One would expect to be able to override any function despite of their returns, just like in code.

avatar image crowdedfire Feb 25 '16 at 02:36 AM

Thanks for this thread! I ran into this issue today.

Thanks to this thread, I made my function return a throwaway junk bool just so that I could override the function in derived BP classes, where I wanted to call the parent function and add additional functionality. (Without it having to live as an event in the main EventGraph.)

Perfectly functional workaround now in 4.10, but it would still be nice if you got around to differentiating between events and functions with no return, considering it's now 2016.

avatar image Syrill Apr 18 '16 at 09:03 AM

Thanks from me, too. Just ran into the same issue...

avatar image Nezon93 Sep 01 '17 at 04:39 PM

Thank you! 4.17. I ran into this issue too.

avatar image Dr.Freeman Sep 01 '17 at 11:43 PM

up this !!

avatar image Dimpl Jan 09 '18 at 04:51 AM

4.18 and this is still an issue! Treating it as an event is not sufficient, as I have behaviour I need to happen after the parent function has completed execution.

avatar image Rasped Feb 23 '18 at 03:48 PM

This should be fixed, it's not very pretty

avatar image Noisegrinder May 04 '18 at 02:20 AM

Nice! It's been 4 years and still a issue in 4.19! What a long ride!

avatar image Zheak Jul 05 '18 at 02:08 AM

_< Just had t o look this up for an inventory system I was building, pulled my hair out for 3 hours trying to figure out why it wasnt working only to find this

avatar image vital_net Mar 28 '19 at 07:07 PM

Still present in 4.21.2

avatar image luoyeshu Jun 16 '19 at 09:41 AM

Still not pretty on 4.22.2 my god!

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

Same here

more ▼

answered Oct 24 '17 at 07:12 AM

avatar image

TextusGames
36 1 3 6

(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