How do I use multiple function parameters with text?

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

    i'm currently trying to create a GUI for dialogue text, but some reason i'm unable to use multiple function parameters that contain text strings.

    The first one works fine, but the second is just displayed as "0" (Zero).

    This are my events:

    Many thanks in advance!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The problem is that the parameters passed to the function used with "Wait for signal" and "Signal" ain't stored. So the when you call the function the first "Longtext" reads the parameter (1) then it waits for a signal, but as it does this the parameters for some reason is "cleared". If you replace the "Set text to function.Param(2)" with for instant "Set text to "test text 2"" then it will work.

    It seems that it might be a bug as im not sure its suppose to work like that, so you can take your chances and make a bug report, but personally if I were you, I would just start creating a workaround for what you are trying to do, because it will most likely not be the last, so you might as well get used to it

  • Wait commands do not block. They take all of the code below them, moves it to a separate thread, and calls it after the condition is met. So all local variables are lost and the function is actually returning on the first wait, so it's parameters are also gone. Just use a global in this case, or store the text on an instance variable of LongText and grab it from there instead.

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