Copy link to clipboard
Copied
Hi,
I'm a complete novice when it comes to HTML5 actions and I'd really like some help trying to figure out a very specific issue if you would?
I have 12 squares (buttons), each button pulls a single random answer from a pot of 12. Each time a single button is selected and the answer is shown the button disappears. So far I have all this working.
The next step is that I want the user to only be able to choose 3 of the 12 buttons - any three, entirely at random and when the 3 have been selected the rest become inactive.
Any help you can provide would really help me,
Thanks,
Aidan
Hi,
Thanks for your reply, I was having difficulty disabling the other 9 buttons that hadn't been pressed because we can't determine which of the 12 buttons a user will choose 3 of.
However I managed to resolve this all now, my if conditionals weren't working correctly. I'm not sure my solution is the neatest or most efficient but it works.
Thanks again,
Copy link to clipboard
Copied
What exactly are you having difficulty with? Maintaining a variable that's incremented by 1 every time the user clicks a button, or disabling buttons that haven't been clicked?
Copy link to clipboard
Copied
Hi,
Thanks for your reply, I was having difficulty disabling the other 9 buttons that hadn't been pressed because we can't determine which of the 12 buttons a user will choose 3 of.
However I managed to resolve this all now, my if conditionals weren't working correctly. I'm not sure my solution is the neatest or most efficient but it works.
Thanks again,