0 Favourites

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

  • 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: drive.google.com/file/d/0B0uZA6 ... 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?

    Thanks!

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • 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.

  • 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)
Similar Topics Posts Views Last Post
Unread hot topic
0 Favourites
[Plugin] tag text
188 25,440
RBuster's avatar
RBuster
Unread hot topic
99 10,136
karshinkoff's avatar
karshinkoff
Unread hot topic
118 32,894
rexrainbow's avatar
rexrainbow