I have made it so any one entering an area is switched to adventure game mode and then when he leaves the area he is switched back to survival.
How ever I am trying to do the same thing else where in the game but the code that is changing everything to survival beyond building one when they leave is affecting the code for building two when you enter.
What happens is the game mode is constantly changed indefinitely between survival and adventure mode.
The code I am using for the command blocks are:
/gamemode 2 @a[r=60,m=0]
/gamemode 0 @a[rm=60,m=2]
Bother buildings use the same code except the numbers are different due to the radius I am covering so building two has a radius of 30.
So what I'm asking is, how can I make it so I can enter and leave both buildings and have the game mode changed to adventure on entry and survival went vacated without the code of both buildings conflicting with each other?
Just to clarify that the command blocks reside below each building.
I'd be greatful if anyone could solve this for me.