Set Members in struct not working

Having trouble setting members in a struct that is a value within a map:

The debug here indicates that the value is being adjusted but not set.

The struct is mapped with an actor reference here:

And that specific member in the struct is the first one, here:
image

I’ve read that there may be a problem with not having a direct reference to the struct. However, I don’t know what I can do to test that. Is there another way to point to the struct? As the struct is nested within a map, I don’t think I can set it directly?

This updating value is running on tick, but i also tried on a timer, and just manually firing an event as well.

blueprint map gives a copy of the struct, so you have to use the Add node afterwards to actually update the struct.

Would be nice if, like blueprint arrays, you could choose to get a copy or a reference. I suppose I could refactor so that the Actor reference keys were in the struct, then it could just be an array. Not sure if there is any performance implications in comparing looping through map keys array to looping through struct array, breaking each one, and checking a member inside it.

2 Likes