Running while unfocused?

Get help using Construct 2

Post » Mon Mar 07, 2016 4:55 pm

I understand you can't run the game while it's unfocused, and nearly every post I've found said to compare timestamps. I've figured out how to compare the timestamp, I just cant for the life of me figure out how to update the progress to what it should be. Can someone explain this to me?
B
10
S
6
Posts: 42
Reputation: 1,050

Post » Mon Mar 07, 2016 7:51 pm

Based on the difference between the timestamps, you'll know how much time was spent minimized. You can then use timescale to accelerate the game at a certain rate until the game has caught up. The faster the rate/higher the timescale, the greater the risk of bugs!
Mistakes were made.
B
54
S
28
G
115
Posts: 1,705
Reputation: 65,083

Post » Tue Mar 08, 2016 9:01 am

@oosyrag do you mind giving me an example on how I can accomplish this? I understand you can accelerate the game, but I'm not sure how to put this on paper.
B
10
S
6
Posts: 42
Reputation: 1,050

Post » Wed Mar 09, 2016 5:01 am

So I haven't tried this myself so i'm not 100% sure, but here's my idea

If time < wallclocktime | Set timescale to 100

Else Set timescale to 1

Maybe add Runonce, but I don't think its strictly necessary
Mistakes were made.
B
54
S
28
G
115
Posts: 1,705
Reputation: 65,083

Post » Wed Mar 09, 2016 2:38 pm

@oosyrag it appears this creates the issue of it permantly being on timescale 100, as there's no possible way that pause date can be greater than the wallclock time.
B
10
S
6
Posts: 42
Reputation: 1,050

Post » Thu Mar 17, 2016 12:59 am

Mistakes were made.
B
54
S
28
G
115
Posts: 1,705
Reputation: 65,083


Return to How do I....?

Who is online

Users browsing this forum: John Cutter and 7 guests