This is probably super common but since im a newbie i dont know exactly what to look for.
I made a number of drawer that open and closes when they are interacted with from the player line trace. Right now
I want to be able to open and close the drawer one by one but i cant figure out how to get the reference to the specific component that has been used. as of now the drawer open but cant close.
I try to Challenge myself to make everything more dynamic in my BPs so i dont want to make code for each drawer but i try to make what i think is called a Map so see which drawer has been opened.
You can see my problem in the video. (and probably in the BP as well) anyhow im stuck and would really appriciate some input on what to look into.
There are many ways you can go about this, one BP with drawer meshes, is one. Or, make a blueprint that can play a timeline when clicked, and inherit from that BP to make separate drawers and doors later.
Hey and thanks for the reply, im getting the right component from the linetrace, but i can get my “map” to go false from the branch so it never closes. Feel like my logic in the map is way off…
When i use play from start the drawer starts over from 0 everytime and never closes.
I remade my logic abit but its still off.
my Idea with the code is that when a component in the BP is hit, its checks if it has been hit before with the contains node, if true go to the flipflop to open or close. if false Add component to the Map and then do the flipflop.
But as you can see in the new video, it opens and closes but the timeline messes up… as long as i only target one component it works fine but when i jump in between it doesnt work.
I can’t see any of your code Can you make the piccies bigger?
I assume you’re using the bool in the map to indicate if the drawer is open? If so, you need to update the map each time the drawer is opened / closed.