I want to check if a component I click on is in a list/set of components that I manually specify beforehand. This is my rolling cabinet blueprint:
It has drawers that can be opened or closed. I obtain the component that my player character has clicked on through an Interaction Interface like this:
So I want to check if HitComp is in DrawersRef, which I was told I can do with the Contains Node. I’ve plugged a Map variable into the Contains node, but I can already tell that this is not what i want. What I essentially need is just a set (unordered list) of object references, which I can fill with the object references of my drawers. I can explain this better in python pseudo code, since that is where I learned how to code.
Pseudo Code:
drawers_set = {TopDrawer, MiddleDrawer, BottomDrawer}
if HitComp in drawers_set:
return True
So what I would need for this is a variable that I can fill with references to the Drawers SM Components in my blueprint. Once I have this variable, I can do the Contains check and if that returns true, I can run logic that will open or close a specific drawer.
Can I make a set of references to manually selected SM Components of my Blueprint Actor Class?