How do I a Textbox with a text under the Text?

0 favourites
  • 9 posts
From the Asset Store
Change delay, create new lines, "backspace" the text
  • First I try to explain my Problem in english:

    I want to have a textfield with 10 Lanes.

    If I press button 1 the text from the array should be in lane 1

    If I press button 2 the text from lane 1 should be in lane 2 and the new text should be in lane 1.

    Now in german:

    Für den Fall, dass mein englisch so schlecht ist das mich niemand versteht aber jemand hier ist der Deutsch kann:

    Ich habe ein Textfeld mit 10 Zeilen

    Wenn ich Knopf 1 drücke soll ein Text aus einem Array abgerufen werden und ich Zeile 1 erscheinen.

    Wenn ich Knopf 2 drücke soll ein anderer Text aus dem Array abgerufen werden und in Reihe 1 erscheinen.

    Der Text der vorher in Reihe 1 stand soll dann aber in Reihe 2 verschoben werden.

    can anyone help a german noob?


  • Guten tag!

    You could use a string variable for each lane. Then each time you need to refresh the text, you could read the variables and write them on lanes on the Text object.

    Hope it helps.

    ps: From what I understand it is not recommended to post in other languages than English in this forum. If you need, use Google Translate to assist you, cheers.

  • Thank you for the fast answer.

    But I cant understand, can you explane it to me please.

  • You could make something like this:

    • String Lane_A = "this is something"
    • String Lane_B = "this is something completely different"
    • String Lane_C = "nobody expects the spanish inquisition"

    And then change whichever lane you need changed.

    Lastly you can assemble each lane into the Text object through the action "set text":

    • Lane_A & newline & Lane_B & newline & Lane_C

    Feel free to ask for further help.

  • Can you Show me a example in construct?

    I cant understand what means "string lane".

  • Yeah, thats what I already did.

    But the Problem is, Bananas on String 1 should be on String 2 after beeing a new word on String 1.

  • I think a good way to do this is using an 1 dimensional array.

    initialise the array to 0, 1, 1 = zero items in the x axis and 1 in the Y and Z axis.

    Every time you make a string use Array -> Push front. It will push the strings that are already in the array back.

    then clear the field,

    and loop through the array in order and add each item to the field. The ones added first will appear at the bottom

    It's the principal of a stack.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you very much for all your patience and help. I did it.

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