Set members in a struct not updated

So I have this map in a parent class. Each entry of the map has an int for a key and a weapon struct for a value. When the user clicks 1 or 2 it changes the Current Fire Mode stored in the weapon struct.


The print statements here print out the expected values. But when I go to use the value in the child blueprint. The Current Fire Mode is not changed.

This print just prints the value set when the struct was created. I’m wondering if I’m using set member properly.

your find node is returning a copy not a ref, what you need to do is add the updated copy back to the map.

or use the index to get a ref from the array

2 Likes

It seems silly that they don’t have a find function that can return a reference. You could implement that easily in C++. Thank you for the help!

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