EDIT: The first description of the problem was not good enough, please note the edit at the end.
Here I asked about how to toggle colors with ocgx. This was the solution:
\documentclass{beamer}
\usepackage{xcolor}
\usepackage{ocgx2}
\begin{document}
\begin{frame}
\makebox[0pt][l]{%
\begin{ocg}{Bul01r}{ocg01r}{1}\actionsocg{ocg01r ocg01g}{}{}{\textcolor{red}{\textbullet}}\end{ocg}%
}%
\makebox[0pt][l]{%
\begin{ocg}{Bul01g}{ocg01g}{0}\actionsocg{ocg01g ocg01b}{}{}{\textcolor{green}{\textbullet}}\end{ocg}%
}%
\makebox[0pt][l]{%
\begin{ocg}{Bul01b}{ocg01b}{0}\actionsocg{ocg01b ocg01x}{}{}{\textcolor{blue}{\textbullet}}\end{ocg}%
}%
\begin{ocg}{Bul01x}{ocg01x}{0}\actionsocg{ocg01x ocg01r}{}{}{$\circ$}\end{ocg}%
\end{frame}
\end{document}
Now I want to have two (or more) buttons such that they influence each other (i.e. if Button1 is red and Button2 is green and one of the buttons is clicked Button1 turns green and Button2 turns blue; and likewise for any other combination). I do not see how this can be done, since Button1 does not "know" what color Button2 has when I click Button1.
EDIT: It seems I did not describe my problem good enough. What I want is (for example) four buttons arranged in 2 rows and 2 columns such that each button influences itself and the two buttons in the same row resp. same column (i.e., one button does not influence all other buttons). The main goal is to do this for an arbitrary number of buttons arranged in a rectangle.