Structure changes not being read in other blueprints

I’m attempting to implement a durability system, which I thought would be simple like any other health system, though I’ve ran into a lot of problems for some reason. I’ve resorted to trying to modify a structure with the durability values (as opposed to my original plan of having a variable in each item). The structure is read fine with it’s changes in the origin BP where the changes are being made, though when I try to read the changed value from a widget where it would eventually be implemented as a durability bar they are only being read as the default value.

What is going wrong here?

I’m also trying to figure out how to save the values once the item has been placed into the inventory, therefore the weapon actor has been basically destroyed. I’m thinking something similar to a save state would get the job done?

Pics for reference. The item ID’s are the exact same as can be seen from the print string. I would like to not have to get a DT for each time the value is changed but I had a similar experience with an interface where the value would be read as 0 while simultaneously being read as the default, unchanged value.

Please ignore the mess. I’m trying to just get the values working, its not optimized and I have to load the widget each time to get the value, though the origin values stay consistent while the widget retains the default structure value.

I think maybe it’s because data table are not writable at runtime.

Also worth noting that using the ‘set members in’ node, means you don’t have to do that big copy across of all the other elements.

Thank you! I plugged all those into the ‘set members’ node just because I’ve been struggling to get this to work and at some point in the past I had come across an issue where I wasn’t able to just plug into the node, but instead had to ‘make’ the structure out. That was probably some error of mine though instead of the engine.

I guess my question now is how can I store the independent durability variable in the tool (not in the struct) after its been unequipped? Since I guess that the actor would be essentially destroyed since its then been broken down into ItemID/Quantity to be stored in the inventory array. Would a save state accomplish this? Or in my search I also came across metadata. Not sure which road to go down.

1 Like

The way to store data and be able to reproduce it at a later date, is the save game :slight_smile:

I also meant to say, you can update tables, but only with a plugin

1 Like

Well.i familiar with the the green hair

1 Like

Update - I actually found that the solution to my problem would simply be to update my inventory’s slot structure to contain an extra variable (Item ID/Quantity/ and the new Durability variable) I just set the members it the slot struct on changes to the durability. Hope this can help someone!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.