How do I go to the next page while game paused?

0 favourites
  • 9 posts
From the Asset Store
five golem elements Sprites Sheet.Best for enemy or villain game characters.
  • I'm currently trying to create the following function:

    Something happens (collision, specific time, etc.)

    -> Text window appears and game pauses

    -> Pressing a button displays the next page of text

    -> Text window closes and game resumes.

    Since i need to use function parameters i wanted to have something like that:

    "Call function 'dialogue' (avatar id, the text)"

    "Call function 'dialogue' (other avatar id, more text)"

    "Call function 'dialogue' (avatar id, even more text)"

    Which i got to work, but because of the "Wait for signal"-action i use in the function i currently have to add "Wait dt seconds" between each function call, which results in a very small "jerk" with each button press. But unfortunately i wasn't able to find a method without it.

    I hope, i could explain the problem in a comprehensible way. And thanks in advance!

  • Sorry for the double post, but perhaps a shorter question for my problem above would be:

    How can i flip pages of text via button press while the game is paused?

    Again, thanks in advance!

  • What part of this isn't working?

    Would using object timescale work in this case?

  • For example, there are three of my "dialogue-functions" in a row, which are supposed to show the text and an avatar. One button press shows the next text.

    But because of the "Wait for signal" in the function it just directly skips to the last one, UNLESS i use "Wait dt seconds" between each. But this results in a noticable jerk between each text display because the game continues for a tiny moment.

    Not sure object object timescale. Like pausing everything but the text object?

  • Seems like there is something wrong with your way of setting up the textobjects..

    I'm not sure why wait for signal would skip to the last one if you have your events set up correctly..

    Would it be possible to share your events, so we can see what the issue is?

  • Would it be possible to share your events, so we can see what the issue is?

    Of course:

    So the function stops the game, displays the text along with UI, waits for the button press and then hides these elements again. And repeat.

    But if i use it as shown above it just displays the result of the last function call. BUT it works with "Wait dt seconds" between the calls, but after pressing the button the UI flickers (because you notice the show/hide actions) and the game jerks since the "dt" happens. But i can't find a way to get it to work without it.

  • Well you are calling both functions the same tick, so ofcourse the second one is executed..

    Putting wait dt inbetween is just postponing the second call a little, so the first one is shown..

    I think you should consider a different way of setting this up..

    Kyatric made this video showing how to create a dialogue with XML:

    it's not the easiest tutorial, but it might give you some ideas..

  • I'm surprised that just displaying several pages of text isn't easier to implement.

    The linked tutorial seems to be much more than i need, but i'll check the tipp with the object timescale.

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Displaying more pages isn't hard..

    The way your events are set up is not right..

    Because of the way construct2 works, if you call the function two times in the same tick only the last will display..

    You could try with a number counting up to what part of the conversation your in, but you have the destroying in the same function, which shouldn't be there..

    You probably want to destroy on conversation end, but then you should let the computer know when that is..

    There are multiple ways to set up something like that, but following a tutorial like the one I linked will teach you a lot..

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