Store text, and recall it

0 favourites
  • 3 posts
From the Asset Store
Change delay, create new lines, "backspace" the text
  • Hi,

    I have tried various things with the variables, but could not get it working.

    At the first layout, there is a textbox where a person fill in their name.

    In later layout, I want to have a text with: Hello (filledinname).

    Getting that information from the previous layout is not working.

    Probably I have to it with the set text to: "Hi " & name.

    Like here scirra.com/forum/a-health-and-limit-in-one-text_topic46973.html

    I know have the problem to get the data from the form correctly.

    I think it can be very simple, but not found a good solution yet, thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You'd want to set the custom name to a global variable, or a global array object, depending on how many other variables you want to share across layouts.

    You can create global variables by right mouse clicking in an event sheet and selecting "Add global variable" from the drop down menu (you can call it "PlayerName" for easy reference). Then, in your events handling name input, once the player gives the OK you can set the global variable "PlayerName" to whatever the player input their name as. Then later on, when you have your dialogue event, you can set the text string as

    "Hi " & PlayerName

    Global variables are called just as you named them, without any quotes.

  • I know what you mean, but I have trouble with setting up the inserted text as global variable. This part 'you can set the global variable "PlayerName" to whatever the player input their name as. '

    Here is also the project file:

    dropcanvas.com/lyy9z

    Thanks!

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