Text Based game

0 favourites
  • 9 posts
From the Asset Store
Change delay, create new lines, "backspace" the text
  • I am attempting to create a text-based gmae. It is suppose to feel like you are using a DOS or Shell-like prompt. However the trouble I am running into is that I cannot seem to get the text to scroll down. After so many lines the screen is full and unable to accept any new lines.

    My current workaround is I created a seperate textbox for every line, with a variable for each line. when the user inputs text the game creates a cascade or domino effect to simulate text scrolling like it would in a DOS or Shell prompt.

    Although this workaround works per-say, it's not ideal and it makes thing more complicated then they really need to be.

    I'm sure this is a silly question but is there a better way. I've not found anything on the searches but maybe I'm looking for the wrong thing.

    Thnak you

  • I was wondering the same thing...   What is the character limit for a text box?

  • Zetar

    The Textboxs seem to have the limit based on the size/font used. Not really running into a character limit.

    On an update by the recommendation of a friend I have switched from variables to an array for holding line values.

  • consolStuff.capx

    doesn't handle text horizontal overflow (might want to add character clamping maybe...)

    but scrolling works nicely

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you, that's exactly what I was trying to get to happen.

    Honestly I'm not sure how the scrolling system works, is it checking the size and resizing the box as needed to scroll?

    Thank you again.

  • Actually it simply deletes the first line as long as you exceed the line limit (:

  • That's perfect. I'm in the process of adapting what you've shown me. It's like 1/10th the size of what I ended up doing to get it to work. Thanks again.

    May I ask why you didn't just put the input box outside the visable box like you did with the cursor on the layout page?

  • 'cause you can't get the focus on the textbox if it's either invisible or out of screen.

    You could replace the textbox object with a text variable and the keycode plugin maybe, but I didn't want to use a third party plugin for my example. So I had to stick to the textbox even if I had to let appear a bit on the bottom of the window.

  • That works, thanks again!

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