Pausing during dialogue

For questions about using Classic.

Post » Mon Jun 14, 2010 6:15 pm

So I've gathered that the easiest, and pretty much only way to pause the game is to set the timescale=0. What I'm going for is to pause the game during dialogues; I have a little textbox set visible=1 on a layer that doesn't scroll, and then I write text to that box depending on the conversation.
Of course, with timescale set to 0, it doesn't really write, now does it? I mean, I could set the write speed to 0, but that sort of defeats the point of writing in the first place; I might as well just "set text."
Is there any way to set just a layer's timescale? Or perhaps to set timescale "everything but this object?" Anything at all that can be used to control timing on different objects? I understand that the whole "layout within a layout" is buggy, so I created that single layer to not scroll at all, and turned it into my healthbar/inventory/etc. layer, which is perfect for the textbox thing. I really don't want to try and swap everything I have now over to a layout-within-a-layout.
Has anyone come up with a way to do what I'm trying to do, or do I just need to accept the fact that I won't be able to write text while it's paused?
Posts: 2
Reputation: 629

Post » Mon Jun 14, 2010 8:44 pm

You'll have to make a method for writing text one letter at a time that is TimeDelta independent. When the timescale is zero, timeDelta is zero and the timer does not increase. You can use ticks though. There is a tick pretty much every frame, and by default construct runs at 60 fps. So you can make something happen every tick or every 16 milliseconds (1000 / 60).

Here is an example:
req at least ver 0.99.84
Posts: 5,588
Reputation: 85,514

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 11 guests