Something gets deleted after clicking several items in a random sequence

Hello there,

I want that an object gets deleted, after clicking several items. The sequence of the clicks is random.

Can someone help me?

Thanks!
Aline

Hi @Aline,

Can you share an image of what you’ve got so far?

Here’s some things to thing about:

  • Which CoBlocks can you use to get a random number?
  • Which CoBlocks can you use to store the random sequence?
  • When you click an item how will you check whether the item clicked is the first in the sequence?

Geoff @ TechLeap

Hi @techleapnz,

sure I can. I think it helps to understand my problem:

delete ‘Tür’ and delete ‘Schrift1’ isn’t working yet.

The problem is that you check the condition only once, because it is inside run parallel loop.
You could check this every time you change your variable. And you could create a function to increase counter variable and make this check, so your code would look better.

Thanks for your advice @Nikolay.

How can I create a function to increase the counter variable? Can you show me an example?

That is the current status. It’s still not working:

Sure, here is a quick sample.

you can remix the CoSpace and explore it

1 Like

Thank you so much! It worked:)