Checking to see what triggered a custom event

Is there a way to have an actor check what is triggering it’s custom event?
For example: The gun triggers the custom event ATTACH in the attachments blueprint. I want the attachment to ask “who triggered this? Oh, that gun? OK I’ll run this code specifically becuase it was that gun specifically.”

I want it to know who’s triggering it so it can run a code based off of the gun it is.

You can use an Enumeration(right click in content browser > Blueprints > Enumeration) Create your list of attachments in that enum, then create an input with that enum type in your custom event. Then set the appropriate enum type with each attachment, and then use Switch on E_yourenumname after your event to fire specific functions for each attachment.

i have no idea what any of that is, i have to study up on what enums are and if theyd be able to do the job im trying to make happen, tho i appreciate the answer, ill try and do things and let u know how it turns out

Enums are very handy and easy to use really. Learning how to use it will make things easier for you in the long run.

Here’s an example:

Ignore the names of the event and tasks. Keep in mind that first you need to create the enum in content browser so that you can use it in the event as an input.

Thank you so much for your help on this matter, what you suggested helped me so much and is gonna make adding many many more attachments and all to the game so much easier.