I am setting up an item system for which I am using datatables to store the data. Right now, I am trying to use that item system to have a blueprint staticmeshactor class detect whether the player is carrying specific items and to perform an action when the player does (eg. a key opening a door). Nothing too fancy.
Now, in order to be able to set which data table is used for each separate actor, I want to set up a variable that stores a datatable value. The problem is; I cannot find any way to do it. When setting up variables, the data table simply doesn’t appear as an option. When I use, for instance, the Get Data Table Row node, I cannot promote the Data Table to a variable either. I have also tried simply setting up a custom struct in C++ that stores a Data Table as a variable (with success), as well as making a new base class for the blueprint that includes a data table, but when I try to plug that one into the Get Data Table Row node, it says that it only supports “literal data tables.”
Sorry, but that’s not what my question was. I know how to create a datatable, and know how to import one. I know how to set it in blueprint as well.
What I want to know is whether it is possible to set up a data table variable that allows me to set whatever datatable I want to use on a per blueprint basis. For instance, if I have a datatable with key items and a datatable with normal items, I want to set it as a blueprint variable whether the item uses the key item data table or the normal item data table. Without having to go back into the blueprint and setting all the nodes that reference the datatable manually.
When I was referring to the data table as a variable, I didn’t mean the particular datatable that I wanted to reference, but I meant a “datatable variable,” like a float variable or a boolean variable.