Movement during pause

Get help using Construct 2

Post » Fri Aug 31, 2012 9:33 pm

Hey all,

I was just wondering what you guys to do allow movement (say, motion within the pause menu) while the game is at timescale = 0?

I really have not figured out the best way to do this. Of course I can just eliminate dt from my expressions, but I feel dirty doing that ;)

What do you guys think?
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,699

Post » Fri Aug 31, 2012 9:34 pm

i think you should make a group for pause which will stops everything , stop keys, animations , layers...
(this is the way i do it ) ^^
B
52
S
16
G
7
Posts: 795
Reputation: 12,830

Post » Fri Aug 31, 2012 9:41 pm

@zsangerous
That seems like an awful lot of work when you can just pause the game effectively in one event, setting timescale to 0.
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,699

Post » Fri Aug 31, 2012 9:44 pm

I would put all sprites into one family, and then
If something -> set "family" time scale to 0 ^^
ImageImageImageImage
B
158
S
67
G
43
Posts: 2,603
Reputation: 35,968

Post » Fri Aug 31, 2012 9:48 pm

Hmm, that might actually work!
Good idea!
sqiddster2012-08-31 21:52:28
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,699

Post » Fri Aug 31, 2012 9:55 pm

You can selectively make objects move when the time scale is 0 with the "set object time scale" system action. Then you can use the Sprite.dt expression to get dt.

For example if you have a sprite with the sine behavior.
This would pause everything else besides the sprite.
[code]     system: set time scale to 0
     system: set sprite time scale to 1.0

every tick:
     Text: set text to sprite.dt]start of layout:
     system: set time scale to 0
     system: set sprite time scale to 1.0

every tick:
     Text: set text to sprite.dt[/code]R0J0hound2012-08-31 21:55:40
B
94
S
33
G
114
Posts: 5,359
Reputation: 73,779

Post » Fri Aug 31, 2012 10:39 pm

Didn't know that sprite.dt existed! There you go. Heh.
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,699


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 14 guests