Magistross's Forum Posts

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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))

  • Use two variables -> LastTPS and CurrentTPS

    Add a "Every 1.0s" -> set LastTPS to CurrentTPS, -> Set CurrentTPS to 0

    On tap -> Add 1 to CurrentTPS

    And use LastTPS to display what "Taps per second" he's currently getting (albeit with a slight 1 second delay).

  • You might prefer a "wait 0", it will execute the remaining actions at the end of the event sheet, with no wait.

  • Easy to miss error, glad I could help you !

  • Replace your first condition with a proper instance variable evaluation, do not use "Compare two values" when you want to do picking.

  • This might be worth looking at : http://typeface.neocracy.org/

  • AnimationFrame is a sprite expression that will give you the which of the frame is currently playing. You could also go ahead with an instance variable if you prefer.