Difficulties with bool array

Hello everybody,
I’m fairly new to blueprints and am having some difficulties with regards to a bool array.
I currently have a grid of 10x10 cubes (I’m using the puzzle grid script from the puzzle template.) Within that grid I want around 10 of them to have an “enemy there”, so when they’re shot by player (I’m in the first person project template) I want the cubes with an enemy position there to change to a specific material, and the ones without an enemy position there to change to a different material.
I need all of the cubes to reference the same enemy array, in this case I’m using a bool array, and change their “enemyHere” variable to true according to that array.

I have tried multiple different ways of doing this, but I haven’t had any success.
I appreciate any help.

Thanks

You are better off not using an external array and instead use encapsulation.

If a block cares about whether or not it has an enemy on it, give it a reference to the enemy and use an event to trigger changing the material.

That way if you change your mind later and have 20 blocks instead of 10 you won’t need to track down an array and try to remember how you were mapping them to blocks, instead the block knows and maintains it’s own texture.