I created a drawer and have about 10 of them in my level. I am trying to put items in these drawers without replicating the item between all the drawers. I was able to find a solution to add a child actor but then it adds tha tactor to all of the,. Is there a way to put unique items in each drawer?
Hey @fontainebrian! Welcome to the forums!
What you can do is have the Key - let’s call that the “LootActor” - spawn and attach on beginplay. Make sure the attached component is the drawer, alternatively give the drawer a child component Scene Node and attach to that, then you can fine tune the spawn location in relation to the drawer.
Now the spawnActorAttached node will take an input of “Actor.” Promote that to a variable, name it LootActor. Next, down in the details section for the blueprint where the variables are located, set that variable to be public, and give it a default actor to use.
Once you place the drawers in the level, now you should be able to CHANGE that “LootActor” variable for each one placed in the level. Just select it in the level, look in “Default” and you can change that actor to be anything else for each drawer. Just make sure not to choose something too big and it should work fine! ![]()
Let us know if you have any problems!