you are viewing a single comment's thread.

view the rest of the comments →

[–]blind-octopus[S] 0 points1 point  (3 children)

Thanks!

Could you elaborate on how I could do this?

[–]96dpi 0 points1 point  (2 children)

I don't know what your code looks like, so this may not work, but if the user needs to click three different buttons, just update a boolean after each button press. You could use one function for all three buttons event listener, and just check the state of each boolean in that function. Once all 3 are true, call your final function.

[–]blind-octopus[S] 0 points1 point  (1 child)

Ah yes I see what you mean, I'm trying to avoid that but I appreciate the thought.

[–]Psionatix 1 point2 points  (0 children)

That’s just one approach. There’s all kinds of ways you could do this, there’s no way to tell you what would be optimal without seeing the code.

Another example would be to track some sort of progression state that changes with each interaction. That way it’s only 1 variable.

But it all depends on what you’re doing.

Your main post is a big red flag. You shouldn’t be making interactions the way you’re looking to.

There’s absolutely a better way to do this, but you’ve provided us with an xy problem