How do I create a scrolling log in a texbox

0 favourites
  • 4 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • 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 [attachment=0:14ug3icb][/attachment:14ug3icb]

    Any help would be appreciated.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Try changing the Type in the properties to Textarea instead of Text.

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

  • 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

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)