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

Get help using Construct 2

Post » Tue Nov 10, 2015 12:45 pm

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!
B
4
S
1
Posts: 8
Reputation: 366

Post » Thu Nov 12, 2015 12:25 pm

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!
B
4
S
1
Posts: 8
Reputation: 366

Post » Thu Nov 12, 2015 12:58 pm

What part of this isn't working?
Would using object timescale work in this case?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Nov 12, 2015 2:09 pm

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?
B
4
S
1
Posts: 8
Reputation: 366

Post » Thu Nov 12, 2015 2:35 pm

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?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Nov 12, 2015 5:21 pm

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


Of course:

Image

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.
B
4
S
1
Posts: 8
Reputation: 366

Post » Thu Nov 12, 2015 5:41 pm

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:
https://www.youtube.com/watch?v=YGW0M2E ... 6HHrKJi95r

it's not the easiest tutorial, but it might give you some ideas..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Nov 12, 2015 7:57 pm

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!
B
4
S
1
Posts: 8
Reputation: 366

Post » Thu Nov 12, 2015 10:14 pm

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..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, newt and 7 guests