Magistross's Recent Forum Activity

  • You ought to migrate from global variables to a plugin like Dictionnary. It allows for the flexibility you seek, although you can't manipulate the data at edit time.

  • See if this can help you :

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Normally you would be able to get all match indexes, but Regex implemention in Construct is a bit lacking. You have to get creative. You will need to use RegexSearch recursively until no match is found, each time passing a substring of the original string that goes from the index of the last match + length of match, to the end of the string.

  • I don't think it's possible to have both "text-align: justify" and perfect word wrapping while doing a typewriter effect. At best, you can programmatically insert "newlines" at key points inside your sourceText so that no weird wrapping occurs.

  • It gives me the match count so I know how many groups of characters there are. A group is either all non-whitespace [^\s] (I should have used \S but it'll work anyway), or all whitespaces \s. Iterating through those, each one is appended to a temporary spritefont until the width becomes too high. When that occurs, a newline is inserted and the process continues. In the end, you obtain a text with newlines placed to make it fit in a predetermined width.

  • You can always use a family for this kind of thing. Add a family instance variable to identify each database and use it to do the picking. Here :

  • It would probably look like this :

  • Here's one way you could do it.

  • What kind of object are your databases ?

  • Construct 2 doesn't really have a good capture groups functionality in its Regex implementation. If you use the global flag (g), you lose the ability to retrieve capture groups for your matches. If you omit the global flag, capture groups will count as matches, which is wrong. You can however hack your way around this limitation by reexecuting the same regex without the g flag on each match to retrieve the groups.

    A regex in this case might prove overkill, if you say your indexes are single digit, you should use mid("GameSave01", 8, 1) for X and mid("GameSave01", 9, 1) for Y.

  • Dialogue System Template — Now for sale in the Scirra Store!

    https://www.scirra.com/store/royalty-free-game-templates/dialogue-system-template-699

    <p>Highly customisable, this template will allow you to spice up your games with a full featured dialogue system as seen in many console RPG and adventure games of old.</p><h3>Core features</h3><div class="deshr"></div>

    • Framerate independant typewriter effect, complete with flawless word wrapping.
    • Supports portrait, with custom placement.
    • Insert variables dynamically inside your dialogues (such as your heroes' names or currently stashed gold).
    • Moddable text commands. Play sound effects, pause between words, etc.
    • Comes bundled with an editor to create your dialogues and test them easily.
    • Data stored as a Jsoned C2 array.

    Use this topic to leave comments, ask questions and talk about Dialogue System Template

  • Use Set Los to floor(random(1,3))

Magistross's avatar

Magistross

Member since 4 Jul, 2011

Twitter
Magistross has 14 followers

Trophy Case

  • 13-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies