How do I set text after clicking a "next" button?

0 favourites
  • 3 posts
From the Asset Store
Change delay, create new lines, "backspace" the text
  • Hello! I am trying to make a game with a dilaogue and there is a text box that changes its text accourding to the character who is talking.

    In some parts, the text was to big for the box, so I have created "next" and "previous" buttons to pass through the text.

    I tried doing it as on the image bellow: when the mouse clicks the "next" for the first time, the variable "clique" changes fom 0 to 1, and when the mouse clicks the next again and the variable is 1, it will set the text again to another text and set the variable to 2, and so on.

    Print: ... sp=sharing

    However, when I click the next bottom (avancar) for the first time, the variable changes from 0 directly for 2, and I cannot read the 2nd part of the text. I guess it is because when one event happen, the conditions to the next one are alreday true. But it shouldn't happen until I click the button again.

    Does anyone have an idea how to solve it or make it in other way?


  • Can't get to that file but I'm assuming it's because of the top to bottom structure of events in C2, where you've probably said if 0 set to 1, if 1 set to 2 so it makes the first event and second event true in order. You can add a small wait 0.1 secs before you set the variable if you want, this should stop that from happening. My guess could be completely wrong but I am assuming this is what you've done.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • plinkie, adding the 0.1 secs wait solved the problem, thanks!

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