How do I create a scrolling log in a texbox

Just started using Construct 2? Post your questions here

Post » Tue Jun 10, 2014 3:23 pm

Hi everyone!

Working on a text game. I have 2 sprites fighting and I want to send the results to a textbox.

Here's the function I'm using:
newline &Self.Text &newline & Function.Param(0)

Here is an example of my function call:
"You use " &sprPlaChar.AttackName &" on " &sprNPC.Name &" for " &sprPlaChar.Damage &" damage " & newline

What I'm seeing is that the text is just being added to the side and scrolls to the right forever. Basically the new lines are being ignored.

Here is the textbox object
combatlog_Object.PNG


Any help would be appreciated.
You do not have the required permissions to view the files attached to this post.
B
5
Posts: 5
Reputation: 211

Post » Tue Jun 10, 2014 3:46 pm

Try changing the Type in the properties to Textarea instead of Text.
B
39
S
12
G
11
Posts: 331
Reputation: 7,727

Post » Tue Jun 10, 2014 4:52 pm

Message: jaytwining is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
Perfect! That solved the problem!

Is there a tutorial or link that explains the different kinds of textbox types? All I could find when I was searching the forums was this: Thanks again Frag!
B
5
Posts: 5
Reputation: 211

Post » Tue Jun 10, 2014 9:06 pm

I don't know of any tutorials that go over the differences. These are really html input boxes. You can google the differences between those. Basically, a Text input object is a single line input box which takes most ANSI standard symbol (numbers, letters and special characters). A Textarea takes the same values but allows the use of multi-line input.

The Number type only accepts number values.

All other options require specifically formatted inputs to be valid (example: the phone number field expects a 10 digit phone number). The name of the type describes how the input should be formatted
B
39
S
12
G
11
Posts: 331
Reputation: 7,727


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest