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

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

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

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
154
S
60
G
40
Posts: 2,574
Reputation: 33,728

Post » Fri Aug 31, 2012 9:48 pm

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

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
85
S
27
G
77
Posts: 5,004
Reputation: 53,742

Post » Fri Aug 31, 2012 10:39 pm

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


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests