Memory Game (matching sequences)

0 favourites
  • 2 posts
From the Asset Store
Match the similar cards with each other and free all animals!
  • Hi all,

    I am making a memory guessing game where squares flash in a sequence (I have this flashing sequence working).

    I am struggling to figure out how to identify the sequence of squares clicked by a user and match it the sequence shown.

    I am not sure if I need to include any behaviours. I have tried to look on here but can seem to find anything relatable.

    Hope you guys can help! Thanks!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You can add an instance variable "sequence" to your squares, and when they are flashing, set sequence to 1, 2, 3.. etc.

    When user clicks the squares, make a variable clickCounter, increase it with every click on the squares. Compare clickCounter with square.sequence and if they don't match, it means that the user made a mistake.

    Or you can do this with two string variables.

    When squares flashing, set string1 to (string1 & square.UID & ",")

    When player clicking the squares, set string2 to (string2 & square.UID & ",")

    Then compare if left(string1, len(string2))=string2

    if not, user has made a mistake.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)