Should be easy; How to update parameters in an actor


I think my head exploded, because I cannot for the life of me figure out how I’m gonna update this variable in runtime. I know you need a lot more info, but basically I’m sure that I have missed out on a few important node types. I have three important parameters in use on this actor class:
Category, Name and Active.

I need to do the following:

  1. First I need to loop through all actors of this class searching for a Category name say “Inventory”.
  2. Then I need to to set all of these checkboxes within this Category to false.
  3. Then I need to loop through all actors of this class again searching for the same Category name, and find the one with a Name with for an example “Washing machine”, and then update that checkbox to true.

Resulting in a solution that only one of the checkboxes are true at any time.

Can anyone help me with suggestion a node chain here? I’m totally stuck. THANK YOU!

Thanks for taking your time to respond!

Take a look at this image below, it’s to the core of what I’m trying to do, but I have no clue how to get the result of Make NH_MeshOptions back into the correct actors. I guess I have to loop somehow, but with which nodes?

I have simplified this blueprint, and it’s not finished, obviously. There will be two breaks and makes in there in the final version, one for “set all Active in the category to false” and one for “set Active to true in the right Category with the right Product Name”.

  • First I get all actors
  • Then I run through them with foreachloop, targetting NH_MeshOptions, which holds the parameters for that actor class (see image 2)
  • Then I Break the NH_MeshOptions so that I can get and update the different options. During tests with Print String, I get that this outputs what I want so far. I can also update and Make NH_MeshOptions, but only on this local globe, not in the respective actors. So this is where it seems to stutter for me. :frowning:

I tried it with no success. It doesn’t seem to save the Aktiv state in the actor, only in the local scope of this blueprint. I was hoping to solve it in the pawn somehow.

  1. Looping through the array
  2. Breaking to get the “Produktkategori” to check for in the Branch at 3.
  3. Set members in NH_MeshOption to not active. All array elements with “Gulv” as category should now have Aktiv set to false.
  4. This should the second time this custom event is run show as false, but it’s true every time, indicating that the Set members in NH_MeshOption is not actually saving the state in the actor (corresponding from the ForEachLoop)

Am I thinking totally wrong about this, or why isn’t the boolean variable updated in the actors? :frowning:
All further help very much appreciated!

This actually seem to have done the trick, but it’s working without the temp variable as well. Might be that n00by me just missed the Set Array Elem node. I thought Set members in … did the same job as Set Array Elem, but allegedly not according to these results.