Pretty new to scripting for games, but I've been getting better everyday. However, one script I've been working on has had me stumped for almost a week now.
The scenario, I've got two boxes in my scene that act like buttons. Starting out the red box should be the only one allowed to go from grey to red. After the red box is clicked, then the green box can be clicked to turn it from grey to green. I'm not wanting a radical script change that does only this, because this is a beta script for what will eventually be used with more "buttons" and a more complex boolean true/false pattern.
The largest problem I faced with this script, is that it does alternate booleans like I want, but not on other object. I put the script on both the green and red boxes, but when I click the red box, the booleans on the green box don't change, so I figure to fix this I'd have to put the script on an empty GameObject, then make these two boxes the children of the empty GameObject. My problem is that once I put the script on the empty GameObject, it doesn't know to change the booleans on the child objects when I click on them individually.
Any help would be greatly appreciated, I've been stuck on this for about a week and some folks at the technology center are wanting to see a working script.