Array of Delegates

Why is it not possible to make an array of delegates? And if it isn’t, then why is it possible to do anyway? I couldn’t find any source about it, but I don’t see a reason why it couldn’t be done thisway. Or if it is intended then how could an array of delegates be used?

Feature request part: It would be nice to store this as a variable also, since I’d use this array somewhere else too. Don’t delegates work like the references? That I could pass around and it would still point at the very same event?

While this does look like an interesting bug, I’m not sure why you would create an array of delegates.

Your example would work just fine if you take the custom event “ClickCard0” and connect it straight to the “BindEventOnClicked”.

Every single card in that array, would trigger the ClickCard event binding and do that PrintString.

I tried to do it with Select node, then I got the message that “Delegate is not compatible with Delegate (by ref).”

There are cards in 5 positions (called Card Decks), and the PlayerController has to know if one of them are clicked, and must know exactly which one. (And I would also like to know if right or left mouse button, so there should be double if it is the Card that checks the R/L button.) Of course I don’t want them to do the exact same thing, the PrintString is just there for testing. Since later the cards would be changed, these delegates should be unbound and bound to another card.

If I’d do it one by one without ForEachLoop, it would be much more ugly copy-paste work at a lot of places. If the bound events could get a variable from the event dispatcher, than I shouldn’t even need multiple events (0,1,2…) for a very similar task.

Hello CrimsonHawk,

I was able to reproduce this issue on our end. I have written up a report and I have submitted it to the developers for further considerations. I have also provided a link to the public tracker. Please feel free to use the link provided for future updates. Thank you for your time and information.

Link: Unreal Engine Issues and Bug Tracker (UE-38138)

Make it a great day