(Solved) How to deactivate interactions with another toggle buttons while one toggle button is activated?

How to deactivate interactions with another toggle buttons while one toggle button is activated?
This is what i tried and i have used this same method before but it is not working this time

Do you have a condition somewhere else that can cause the MiningUI interactions to be deactivated? Otherwise they can always be active by default and the boolean toggle is continuously going. If that’s not the case here I would say try dragging the subconditions out unless there is some reason you need the interactions on MiningUI to be active AND the bool Activatemine to be False before activating ChoppingUI and TillingUI

Okay i have figured out the activation deactivation event but now i want to make it so that when i click (ex button 1 it unchecks button 2 and vice versa) i have made it so far that i can jump back and forth between two of them but the player animation won’t play if i use the event below

My tip is to not do something when button is clicked or mouse button/touch released

But simply make Boolean variable
And when button is interacted with you toggle state of that boolean variable
There is literally toggle action which switches state (true/false) of that variable
Instead of setting it to true of false

This way when you click on button when boolean is true it will always switch to false and vice versa

Now you make 2 events each with conditions to check state of that boolean
Where in one you check for true and in other event for false
And based on that you set up your actions

And now imagine you have two buttons and two booleans
Let’s say MusicPaused and SoundPaused
You want either for music to play or sound but not both and not none

So you check if MusicPaused boolean is false and in action you SET (not toggle) SoundPaused to true

While if MusicPaused is true in action you set SoundPaused to false

Now you do the same for SoundPaused boolean
And set it button to toggle state of SoundPaused Boolean

I tried what you said but there is a confusion i am trying to switch between multiple buttons back and forth and what the code does is toggle the same button

i want something like this but of course the code is not working

I am unsure what is wrong here but 1st thing that is odd to me is that you made a lot of sub events while i use none

Idea is when you have variable which you toggle
Events what check state of the variable should be independent from that event (NOT sub events)
They will work on their own
Maybe that is the conflict

I switched to different method to toggle on and off each button manually works fine so yeah
All good :smiley:

1 Like