How do I append text to textarea object?

Get help using Construct 2

Post » Wed Aug 03, 2016 3:10 pm

I've searched a bit for a solution to this; I'm trying to design a event/combat log for my game and need to be able to append (add) text when new things happens ingame.

However, the problem is that the textarea object only has "set text", which removes the current text when I'd like it to stay, and have the new text added in the bottom.

How should I approach this problem? Any solutions appreciated!
B
3
Posts: 3
Reputation: 456

Post » Wed Aug 03, 2016 5:38 pm

Hi, try this: Textarea SetText -> Textarea.Text & newline & "TextYouWantToAppend"
or if You want to put the fresh message to the first line, then:
Textarea SetText -> "TextYouWantToAppend" & newline & Textarea.Text

Hope this helps
B
19
S
4
Posts: 32
Reputation: 1,044

Post » Wed Aug 03, 2016 5:48 pm

vargazso wrote:Hi, try this: Textarea SetText -> Textarea.Text & newline & "TextYouWantToAppend"
or if You want to put the fresh message to the first line, then:
Textarea SetText -> "TextYouWantToAppend" & newline & Textarea.Text

Hope this helps


Yes, that's exactly what I had in mind, thank you for your time!
B
3
Posts: 3
Reputation: 456


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 28 guests