How do I change the colour of words in a variable which contain a particular letter?

Order by:
Duplicate Topic
Posts
Views
Last Post
0 favourites
  • 7 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • I am trying to change the colour of some of the words which contain the letter "ि" out of hundreds of words in a variable containing stories from the Hindi Language automatically without having to change the colour about 40 letters manually which will be displayed by a text object for an app which i am making to help myself and possibly others to learn the Hindi Language.

  • I mean you could have bumped the other thread, but I think the posted solution isn´t what you were looking for. Try this:

    C3P

    wackytoaster.at/parachute/worldcolor.c3p

  • Hey,@WackyToaster I have tried to colourise different words contaning a single and some times even multiple(or more than one)letters but i am unable to do this,So can you please help me with this problem and I am greatful to you for helping me with my previous problem and Thank you for this.

  • I´m not 100% sure what you mean. If you elaborate on what you are trying to do I´ll take a look.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well WackyToaster I am trying to highlight any word from "Global Variable 1" which contains any letter found in "Global Variable 2" which are seperated by whitespace into red colour,like for example if "Global Variable 1 " contains a text which is I am a very good and great person" and if "Global Variable 2" contains the vovels "a e i o u" which are here seperated by whitespace then in this case I want to highlight all the words in "Global Variable 1" which contain the any of the following letters "a,e,i,o,u"(which are contained in "Global Variable 2" and are seperated by whitespace in it) into Red colour which in this case is "I,am a good person.",and here I have underlined the all the words of "Global Variable 1" which contain any of the letters which are found in "Global Variable 2" and I want those words to be Coloured in the colour Red as they contain the one or even more than one letters which are found in "Global Variable 2".

  • Ah, alright. Check this out:

    wackytoaster.at/parachute/wordColor+.c3p

    I just used qwerty instead of aeiou since vowels are so common and it just marked every word. :)

  • Ah, alright. Check this out:

    https://www.wackytoaster.at/parachute/wordColor+.c3p

    I just used qwerty instead of aeiou since vowels are so common and it just marked every word. :)

    Excellent solution.

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