How to have only 1 selected option between 2 multiple choice components?

I have a slide in a Desmos activity that has 2 multiple choice components that I am using to show/hide other components, and I wanted to make it so that there can only be 1 selected option between both multiple choice components.

Let’s call these components mc1 and mc2. Here is the CL I tried:

In mc1: change = when mc2.isSelected(1) or mc2.isSelected(2) “1”
otherwise “0”

resetOnChange: change

In mc2: change = when mc1.isSelected(1) or mc1.isSelected(2) “1”
otherwise “0”

resetOnChange: change

It mostly works, but for example, when I select a multiple choice option from mc2 when mc1 already had an option selected, it takes 2 clicks to select the option (the first click resets both mc1 and mc2). How do I give this CL smoother functionaltiy? Thank you!

I’m struggling a bit to visualise what you’re actually looking for here. Could you share your example slide and intended aims? It might be possible with just one MC component, or indeed with three where the “second” MC is a choice between two otherwise identical MCs… hard to know until we see what specifically you’re aiming for.

Similarly to @pirsquared, I’m not sure why you need two separate multiple choice components. What’s happening, though, has to do with how resetOnChange works, which activates when the text changes.

So, here, if you select an option in mc1, change in mc2 is 1, and it “resets” because it was initially zero. Now, you select an option in mc2, change in mc1 is now 1, it resets, which resets mc1, and also means change in mc2 changes and resets that component. Thus, requiring the second click. The selection was actually made, but was immediately reset because of the circular resetOnChange.

You might want to consider mocking up some buttons in a graph component that use actions instead of the two multiple choice components. You can have your action in “mc1” reset “mc2” on click, and vice versa. Since it’s not reliant on something changing, but on a particular action, I think you’ll get the results it sounds like you want.

Final Exam Review (CP Pre-Calculus) 2023-2024 • Activity Builder by Desmos Classroom