Magistross's Forum Posts

  • A tile is either an obstacle or not.

    However, a few options are open to you.

    First, you could add directional conditions on wall tiles and its opposite tile, so an entity could walk along it but not through it.

    Like this (grass tiles act as walls) : https://www.dropbox.com/s/4xaq1y5yt97hi ... .capx?dl=0

    Or, you could use a new tilemap, with smaller tiles, where all pathfinding is done.

    Like this : https://www.dropbox.com/s/9ammml47pelh8 ... .capx?dl=0

  • There is nothing that stops you from adding all tiles as walkable except the walls.

  • It's a test for a match. So you need a "Test Regex" condition. The String parameter is your letter, the Regex parameter is "^[!@#$%?&*()]$" and the flags are irrelevant in this case so you can leave it empty.

    If it works by removing those characters (^ and $) it's because you aren't testing the Regex with a single character. ^ means "match beginning" and $ means "match end". So along with the rest of the patterns, the Regex test if the String is a single character that is either one of those inside the brackets.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'll see if I can get it to check all special chars rather than having to multiple checks for each character.

    simple regex would work. For example, "^[!@#$%?&*()]$" would check if the character is one of those inside the brackets. You can add more symbols as you will. If you want to check for "]", add "\]" inside the brackets, and if you want to check for "\", add "\\".

  • Waltuo It seems the system is set in "Tap choice" mode. Locate the Dialogue_TapChoice global variable is set it to 0. This should put back the system in selector mode.

  • Being 3rd party plugin free, it should work right off the bat. Everything worked as it should when I tried, and it seems it was the case for Mikal too. There was some sort of problem with copying objects between projects but it seems to have been resolved, so adding the template to an existing project should also be the same as in C2.

  • 5% CPU increase is quite a lot for only 1000 operations. However, as you said, OP will probably not need that many checks.

    It can become relevant when many objects compare there distance to many other objects, akin to collision testing.

  • Why not just use the distance expression?

    distance(sprite.x, sprite.y, player.x, player.y)

    The distance function (euclidian) uses the dreaded square root. So it's better to use something else if the distance check is to be repeated many times.

  • Either one of these distances in an expression depending on your need.

    https://lyfat.wordpress.com/2012/05/22/euclidean-vs-chebyshev-vs-manhattan-distance/

  • Hi JarrydHuntley!

    I'm glad you found my template to be useful. It's always interesting to see what other people do with it.

    I guess you could hack in some sort of while loop to fetch text word by word. At the very end of the "Dialogue_NextChar" (as you correctly identified), try modifying the "Add normal character" part like so :

    This should produce the desired result. Keep in mind that this will skip any command placed inside words, since the "Dialogue_CheckCommands" will only be executed at the begining of words and at each whitespace (instead of at every single character).

    You might need to change the Regex I used on line 91 of this screenshot. "\S" will match any non-whitespace character, including punctuation and the like.

  • First, give your button an Id if you didn't before. If you don't have a Browser object, add it also. Then, using the Browser object's "Execute Javascript", execute this little snippet :

    "document.getElementById('exampleId').className = ""mdl-button"";"[/code:132djd9a]
  • You can also use the Text object's "Set web font" action to load your css file dynamically. It's a bit of a hack but it works. Otherwise, this plugin will most likely be better and easier.

    However, adding CSS classes to form controls is not as easy. I guess you could hack them in with some "Execute Javascript" from the browser object. However, I believe a custom made behavior would serve you better.

  • Another option would be parsing CSV into 2D-arrays with events.

    This is quite easy -

    First loop breaks the file into lines using tokencount/tokenat and line break as separator.

    Second loop breaks each line into values with tokencount/tokenat and comma as separator.

    This is fine when you can be 100% sure that your values won't contain linebreaks nor commas. Otherwise, parsing CSV requires a bit more work than that.

  • You can use unbounded scrolling and have near infinite layout size.

  • Arrays aren't that hard to work with. However, as soon as you want to externalize your data, things get complicated a little bit. Your only recourse is the strict JSON format that you get when you use the "Array.AsJson" expression or when you invoke the "Download as JSON" action.

    Knowing that, it should be possible to create a script that can switch between plain CSV to C2/3 JSON array format. If you are using Excel, I guess a VBA script could do the trick.