Howdy, I was wondering How to loop through an array of actor blueprints and set a variable in each. I’ve built the array with “Get all actors of Class”, and the all have a variable called CanPlaySound, and I want to set them all to yes.
Oh, sorry I wasn’t more clear. The Get node and the Array Element nodes are incompatible with the Set Can Play Sound for some reason. If the array is populated with only one type of class, shouldn’t this be possible?
I can not tell where you got this node from (since usually you only have access to nodes from your blueprint. All other once have the be get through the context of another pin. For example when something enters your radius you get the “Other Actor” node. Once you have that you can pull a line from that pin and search for the variable).
Otherwise it should not be visible in the first place.
So: Either your array is of the wrong type or your “Set Can Play Sound” node is not the variable you want to alter but rather something engine specific (maybe a variable from the Character class or the Controller. Something like that).
In the first case delete all references to that array, select the correct type and place the references new.
In the second case remove the “Set Can Play Sound” node, pull a line from your “Array Element” and search for the variable.