Dialogue attempt and WAIT issue

Get help using Construct 2

Post » Tue Jul 24, 2012 1:16 pm

Hello, everybody. Take a look at this pic:



(Click HERE if you can't see it)

That's a very small test file I'm using to, well, TEST stuff. I'm currently researching options to create a dialogue-like text box.

The idea is that a pre-set text is shown letter by letter in a Text object. When "Q" is pressed, a test text is stored in a text variable ("12345") and the program is told there is new text to show (Set boolVarDialoto to 1).

Right next is an event that activates when there is new text to show; i.e. when "Q" is pressed. The first thing it does, it toggles the "bool" value so the same main event won't repeat itself, then immediately clears the dialogue box and sets a basic "i" variable to 0. This "i" variable will be our pointer.

Now comes the problem part. Next, there's a "Repeat" event. It will repeat as many times as characters are in the stored text, and it appends said text, one character at a time, on the displayed Text Object. This WORKS PERFECTLY. The problem is the effect.

See, when in-game, all text is shown at once. In order to see a "one character at a time" effect, a waiting must be present betweet each letter. As you can see, I've added a WAIT action to cause such effect. IT DOESN'T WORK.

Depending on where I place that WAIT event, things change. If I place it at the beginning of the REPEAT set of actions, it effectively waits the indicated time, but then shows the text at once; no waiting between characters.

If I place the WAIT action between the text append action and the add value to variable action, it shows a row of "11111" instead of "12345". And of course, no waiting between characters.

Lastly, if I place the WAIT action last, there is no waiting at all, but the text shows "12345" as it should.

Is there a bug with the WAIT action? Is it my Chrome Browser? I'd appreciate suggestions on the nature of this annoying issue as well as suggestions on how to improve my string-tied design.

Thanks in advance!

(Max)
B
30
S
2
G
5
Posts: 7
Reputation: 5,099

Post » Tue Jul 24, 2012 1:27 pm

this will not work as you want, because you're doing a mistake.

if you want show the text "12345", letter by letter, just make it:

add to objectText "1"
wait 1 sec
add to objectText "2"
wait 1 sec
add to objectText "3"

BUT, in this way you'll finish it in one year or more, lol

Also, visit these topics, it may help you:
http://www.scirra.com/search?s=letter+by+letter
http://www.scirra.com/forum/letter-by-letter-effect_topic53257.html
http://www.scirra.com/forum/letter-by-letter-text_topic38579.html
ImageImageImageImageImageImage
B
93
S
19
G
12
Posts: 1,192
Reputation: 18,301

Post » Tue Jul 24, 2012 2:49 pm

Thank you! :-)

(Max)
B
30
S
2
G
5
Posts: 7
Reputation: 5,099


Return to How do I....?

Who is online

Users browsing this forum: R0J0hound and 24 guests