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
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

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
48
S
15
G
6
Posts: 795
Reputation: 12,035

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
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

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
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Fri Aug 31, 2012 9:48 pm

Hmm, that might actually work!
Good idea!
sqiddster2012-08-31 21:52:28
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

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
79
S
24
G
54
Posts: 4,743
Reputation: 40,749

Post » Fri Aug 31, 2012 10:39 pm

Didn't know that sprite.dt existed! There you go. Heh.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400


Return to How do I....?

Who is online

Users browsing this forum: Skebab, totoe and 13 guests