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"

Bind event not compiling in blueprints

Hi,

I a new to Unreal development. I'm using blueprints for my AI and I hope you can point me in the right direction for my problem.

I work with an AIPerception Component. When I bind a custom event to the OnTargetPerceptionUpdated event dispatcher -> it compiles. When I bind a custom event to the OnTargetUpdated event dispatcher -> it doesn't compile and gives me the message "Event signature error. Function not compatible".

Is this a bug in the engine ? Or is there a concept I don't get ?

ue version : 4.10.3 on windows

alt text

Product Version: UE 4.10
Tags:
ue4_bp_compile.png (109.8 kB)
more ▼

asked Feb 21 '16 at 03:23 PM in Blueprint Scripting

avatar image

Benlenem
21 1 2 4

avatar image Shadowriver Feb 21 '16 at 04:37 PM

What type of array argument is?

avatar image Benlenem Feb 21 '16 at 04:38 PM

It is an array of Actor.

It is super easy to reproduce : I created the custom event with a simple drag and drop from the "Bind Event to OnPerceptionUpdated" box.

avatar image KieranChandler Mar 02 '16 at 08:26 PM

I am getting this too, except the parameter is an array of uclass pointers. my delegate declaration: https://gyazo.com/a6ec9e8273fb4d97d431d6994eb8b67d

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

1 answer: sort voted first

I believe the problem here is blueprints use references, so the fix would be to change the delegate parameter type from

 TArray<AActor*>

to

 TArray<AActor*>&

However, this introduces another error, because delegate parameters must be const. again, there is a simple fix for this:

 const TArray<AActor*>&

So for example, my final delegate declaration is this:

 DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FSelectionChanged, const TArray<UClass*>&, SelectedUnits);


Hope this helps,

Kieran

more ▼

answered Mar 09 '16 at 05:12 PM

avatar image

KieranChandler
128 10 17 20

(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