How do I change specific letters sequentially (forward or backward) on text object?

0 favourites
  • 3 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hi

    I need to create a system which shows a code made up of letters and after a few seconds they become asterisks and the user has to type the same code that changes from asterisk to key pressed. There is also the possibility for the user to go backwards, erasing each letter typed.

    I'd need to know how can I do to replace the letters by asterisks (one by one with one second apart) once shown, and how to replace the asterisks by letters as the user types and letters by asterisks as the user backtracks what was typed.

    Thanks in advance.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • One idea is a Text instance per letter and store the original character in instance an variable. Then it's just picking after that.

    Another idea is utilizing left, mid and right to modify a text variable. For example text = left("********", n) & right("Codeword", 8-n) to change the first n characters to stars. Or to change the nth character to a star: text = left(text, n)&"*"&right(text, len(text)-n-1) But there's more to it than that probably.

  • Thank you!

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