Getting collision from gameobjects in an array, and changing properties of other gameobjects from that array
Hello, I'm new to programming (I know the basics but I'm still working on getting the logic of stuff to work) so I'm trying to create a little puzzle that's really simple but I just cant figure it out and the problem of it is cause I don't know how to get collision from a specific item in an array.
so the puzzle is very simple, but I don't know how to get individual collision from an array ;-; if you collide with the Obj[4] it would make [1][3][5][7] the opposite of what it currently is so I know it has to do something like bool On = !On but Idk how to implement it and get collision for individual collision from the array and for it to affect the other gameobjects in the array.
sorry for the probably really noob question but thank you for helping.