How do I do a text parser (or something)?

Get help using Construct 2

Post » Mon Feb 09, 2015 2:48 pm

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.
B
67
S
27
G
24
Posts: 969
Reputation: 18,573

Post » Sat Jul 02, 2016 10:44 pm

Hi, I try to implement this technique by calling a function whenever a character needs to inform the player about smth. Function has 2 params: text itself, text object ID.

inside a function I set a variable, and while it is set I do the "every 0.05 sec" routine with function parameter 1 instead of SourceText.Text (as in example)

No typing is detected sofar and the only text I've received is "text"

Can anyone help me?

p.s. I use rex's function2, but it shouldn't be a problem, right?
B
3
S
1
G
2
Posts: 6
Reputation: 837

Previous

Return to How do I....?

Who is online

Users browsing this forum: JaredX, MadSpy and 6 guests