How can i turn this into a function?

I currently have all of this on a child of a parent object and i want to put it into the parent so i can just attach the UDPs for each child to the function call as opposed to recreating this functionality everywhere.

Currently it tells me I am not able to giving this error message:

image

The full BP looks like this:

I was hoping i could turn the UDP into a BP but it seems I am unable to

You can create a function in the parent object with an input parameter of UDP, either as an array or as a single variable. Inside that function, call the bind event. From the event delegate pin, search for “Create Event.” In that node, there will be an option to create a matching function—select that. A function with the same input parameters as the event will be created and automatically assigned. Then, copy and paste the logic from the event into that function.


This way you only have to call the function in the child object

I actually seem to have managed to make this work in the UDP object - i created a new BP for it and then added instances of that BP to the “module” as needed - 6 of them in this case - but they each contain the logic for the snapping behaviour.

it looks kinda messy though…

This bit in particular feels kinda fragile:

This is how the “module” looks with the instanced UDPs:

Try my method, you will only have to write the logic in parent object

Roger that - though that said I do want the UDPs to be instanced BPs - so I can also attach other objects to create normals