mattshallow's Recent Forum Activity

  • No there is nothing else there. I have a text file of letters with special chars and using AJAX to read them in. I am then populating an array. The letter comparison check works fine but the special chars do not. The original piece of code I have in screen shot still does not work.

    Maybe when the char is converted from .txt the formatting for special chars is altered. Or possibly when read into the array but I can see the values in the debugger. Below is the code reading file and placing in array. I am actually randomly selecting letters from array to place individually on object.

  • If it does I will hit myself! I'll check now....

  • I have a bit of a workaround now:

    System->left(letterText.Text, 0) = "$"

    Checks the left most character and I can compare. I'll see if I can get it to check all special chars rather than having to multiple checks for each character.

  • [quote:2nymnz3y]Do you need to check if the text contains "$", or if it exactly is "$"?

    I need to check if the text is "$". To be more precise I need to check if the text is any special character. I was looking a regex but I am not sure which regex will suite my needs.

    So to be clear. I have a piece of text that can hold one special character. I need to do a check to see if that text is one of the special characters so I can add to a variable.

  • I tried that also and does not work. I did discover that the special characters are recognised as both upper and lower case. Don't know if that means anything though.

  • I am trying the following which should work. The text box contains a "$" string. I have tried a few other special characters and it also does not work. It works with ordinary characters though.

  • Tnx again!

  • Just to point out, event 16 is making sure the letter snaps back to its origin when removed from space. This is not covered by event 9's else statement as far as I can tell or something is preventing it.

  • Awesome! It's working now. That was a good tip also regarding overlapping boxes. When I tried to drag over two boxes a box was set to true when it did not have a letter in it. I wonder can I clean this up a bit though. I have three separate events now to cover all eventualities. I don't see how I can simplify though....

  • I have attached an Image to make it easier to explain. There are 8 spaces and 21 letters/symbols.

    I need to the game to have the following functionality:

    drag letter on/off a space and the letter snaps to center of the space

    letter cant go on a space that already has a letter. If you try drag a letter it will just go back to original position.

    letters on one space can move to an empty space but if there is a letter there it returns back to the space it was.

    Basically you should be able to drag and drop letters anywhere as long as there is not already a letter there.

    Below is working logic for dragging and snapping while also making sure the letter cant go on a space that already has a letter:

    The area I am having trouble with is when you drag a letter off a space and have the space's boolean value set back to false so that another letter can be placed there.

    Any help would be much appreciated

  • I restarted software and started tutorial from scratch and now I have the option. Phew!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I just saw an online video. I am missing the "Platform" section in "add action" window. As I mentioned I added 8 directional behaviour to the plane. I also tried adding Platform behaviour to see if that section displayed but it did not. Why is it not there?

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