Question about actors influencing other actors
jackrollins
Member Posts: 1
in Help Wanted
I'm trying to build a simple reversi-like game. In reversi if you place your black pieces on either side of a white piece you flip the white piece to black. I'm trying to achieve a similar effect.
I tried to set the attribute of an object where if the pieces on either side (horizontal) colors change to black (or white) if it is the opposite color it will then change to the same color as in reversi. However I can only set it to respond to it's own attributes, not another objects. Any advice on how to achieve this would be appreciated.
Comments
@jackrollins Since we can only access properties of objects that have been instantiated within the scene you can start with pieces placed in every available spot and turn their alpha to 0 to make them fully transparent. Then instead of creating or spawning them at run time you can just turn the already placed pieces alpha to 1 (so they can be seen). Since you're then dealing with objects that are already in the scene you can access each one of their properties to change colors and what not.