How to use Custom Event in the Function(to Bind to an Event Dispatcher)

In the “Sheet” class in Event Graph, I call a function. The function has a loop, and it creates “Slot” classes which I need to bind to the “Sheet”. I have tried to return the “Slot” instance to bind it in the Event Dispatcher, but the loop does only an iteration and closes.

How can I create some “Slot” classes and bind them to “Sheet”

I don’t think you can do it that way, because the function environment ceases to exist once the function has run. Wherever you bind the event, you can only do it once anyway.

What are you trying to achieve, can you give an overview of the concept?

I have resolved the problem! I added “Create Event” node. So, when I call “On Touch Started” the function “OnSlotTouched” is triggered.

P. S.
“OnSlotTouched” is a function in the “WBP_SheetInventory” with an integer parameter “Touched Slot Index”