I’m trying to make a container that the player can take stuff out off. I want to create a dynamic system that works for any container and that you can easily change the inventory of any container. This obviously calls for variables so I made a structure variable for checking the inventory of one container with children for each item in the container. I tried setting the string of the variable to the same name as the object and then calling for it when the object is created on the ground next to the player, when the player takes it out of the container, but this doesn’t work for me. Am I doing it wrong? Is there an alternative way to do this? Here are my events:
Sets the string to the name of the objects.
Tries to create an object with the information in the string variable.