How do I Define letters within text?

0 favourites
  • 5 posts
From the Asset Store
Change delay, create new lines, "backspace" the text
  • Hi

    The game I am making effectively plays like this;

    The user has 8 counters they must flip (by reading the word on it correctly) before the other person (who also 8 counters).

    Once the person has flipped all counters they must choose a picture card which depicts something that starts with the same letter as the last counter they flipped.

    This wouldn't be too tricky, however i would like the user to be able to create their own sets.

    Is their away for construct to pick out the initial to entered text so that the user may enter their own text but the game will still be able to recognize which letter it begins with.

    Thanks in Advance,

    All help appreciated.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can keep the worlds other players enter in a Json file which you can load on start of game.

    And for checking the first letter of a world you can use the system expression, one of this two will do.

    left(text, count)

    Return the first count characters of text.

    mid(text, index, count)

    Return the count characters starting from index in text.

  • You can keep the worlds other players enter in a Json file which you can load on start of game.

    And for checking the first letter of a world you can use the system expression, one of this two will do.

    left(text, count)

    Return the first count characters of text.

    mid(text, index, count)

    Return the count characters starting from index in text.

    Cheers, Was already familiar with the ways to allow a user to save sets just wasn't sure on the expression to pick out the initial, thanks a bunch.

  • You can keep the worlds other players enter in a Json file which you can load on start of game.

    And for checking the first letter of a world you can use the system expression, one of this two will do.

    left(text, count)

    Return the first count characters of text.

    mid(text, index, count)

    Return the count characters starting from index in text.

    Have tried doing this in the following way:

    Left(leaftext.Text,1)

    I tested this by filling the text boxes that are going to be displayed inside the leaftext object with just the letters that were meant to be detected and it worked.

    However, now I made the cards full words it doesn't seem to be able to detect the initials.

    Not sure if i'm doing something wrong.

  • If you keep all the words in a single variable or an array cell it wont work. You will have to put each word in a array cell, and then call the Left system expression on each cell to get the first letter.

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