mattshallow's Recent Forum Activity

  • nevermind I see it does not.

  • hey kriand, Does that project you linked work in c2?

  • I need it to go to the touched object. I will have a look at your examples there.

  • In the image below I want the hawk to swoop from top left of screen towards a worm that has been touched by the player. I then want hawk to end up at other end of screen. The worms are spawned and are moving. I am not sure what behaviour to use: pin, bullet, car physics, path etc...

    Any good examples out there?

  • [quote:3d8jrzzl]Special characters can't be lower or upper case

    For me they are being detected under both. So if I toggle off my Regex expression without the else statements, the special char will be read into both upper and lowercase.

  • Just to clarify, I do have it working using regex search and having the other two events as else statements

    check if special char

    else

    check if lower case

    else

    check if uppercase

  • [quote:3ko9lbit]But after that the condition letterText text is "$" worked for me

    Did you toggle off the lowercase and uppercase events below it? Because special characters are considered as lower and uppercase also. If they are off the statement does not work for me.

    [quote:3ko9lbit]You can actually get rid of the txt file and AJAX, just store all letters in a text variable

    That's true. I am just trying to get familiar with construct 2 features. I will eventually have a save and load file so I might need AJAX for that.

  • yeah it is much clearer now. I am at the point now where if it ain't broke don't fix it. Thanks for the explanation!

  • OK, this works.

    RegexSearch(letterText.Text, "", "i")

    removing ^ and $ before and after square brackets while also having the correct boolean check.

  • I spoke too soon. regex search seems to not filter the strings at all. I wonder do you know the particular regex function I should be using for this check?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • [quote:20ol6kky]A simple regex would work. For example, "^[!@#$%?&*()]$"

    RegexSearch does the job. It is now working

    RegexSearch(letterText.Text, "^[!@#$%?&*()]$", "i")

    I was not too familiar with regex but since you gave me the format for it that made testing much easier. I need to read up more on regex.

    I appreciate all the help guys!

  • [quote:qr1741gp]Are there line breaks or spaces between each token in the file

    Nope. The condition in original screenshot works with other letters in the file. Just not with special chars.

    I tried changing format of file and used trim() to make sure no extra chars in the text but still no luck. I think regex is the way to go if I figure that out but this issue might pop up again so want to resolve that first.

    Attach is the capx.

    https://drive.google.com/open?id=1ZSuWmbdBYQGwgfM5Nbl9g4ioLBIBJ8nl

    Thanks again for your help!

mattshallow's avatar

mattshallow

Member since 31 Jan, 2018

None one is following mattshallow yet!

Trophy Case

  • 6-Year Club
  • Email Verified

Progress

7/44
How to earn trophies