Multiple buttons with on/off states but only one on at a time?
JCFord
Member Posts: 785
Whats the best way to approach having multiple buttons each with an on/off state, but being able to only have one on at a time. i.e. If one of the buttons it turned on, all others must then be off?
Comments
Then in each of the buttons have an integer attribute called something like "myButtonID"
Then, in each button Actor, two Rules, like this:
Rule
When Touch is Pressed
Change Attribute: game.currentSelectedButton To: self.myButtonID
Rule
When game.currentSelectedButton = self.myButtonID
[Change to ON state]
Otherwise
[Change to OFF state]