Instance Example - making a memory game

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Instance Example

    Like a memory game where you find two alike. How can I use instance for that? If you have 16 identical duplicate actives and you need to find 2 identical ones. I try with spread value but it doesn't work as it should. In spread value they have a specific number. How do I win the pair in code where they must match together.

    My Youtube Channel:
    Go to Please login to see this link.

  • What a coincidence. I just made exactly what you're talking about a couple weeks ago.


    What worked for me was

    1) At the start of frame, Start loop "ID" NObjects (active) /2 times

    2) Then On loop "ID", if alterable value of (active) = 0, pick one of (active) and set alterable value to LoopIndex("ID") + 1

    This will assign [1 thru however many duplicate actives you have] to half of your active objects.

    Then simply duplicate line 2) so that [set alterable value to LoopIndex("ID") + 1] will be applied to the other half of your actives.

    Nice thing about this code is it will apply it to ANY amount of duplicate actives you have in your frame, as long as there's an even number of them.

  • Brilliant idea💡

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!