How to implement PAUSE

Get help using Construct 2

Post » Thu Aug 30, 2012 7:12 pm

Well I know i can use RexRainbow's plugin and I could also set the time scale to 0. But my problem is regarding a custom "bounce" behavior i made which doesn't pause in both cases. I would like to fix/modify my behavior and have it work with the time scale, i just need to know what variable do i have to work with and what is the concept of using time scale in a behavior?
B
17
S
9
G
7
Posts: 249
Reputation: 6,922

Post » Thu Aug 30, 2012 7:21 pm

Disregard, i already found out what to do.

"this.runtime.timescale" is just a multiple of time and after implementing this in my behavior, the pause plugin works great.
B
17
S
9
G
7
Posts: 249
Reputation: 6,922

Post » Thu Aug 30, 2012 9:20 pm

Eh, not quite! You need to use dt, which automatically takes in to account the timescale. More in this tutorial. Have a look at the built-in behaviors which all take it in to account.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Thu Aug 30, 2012 10:00 pm

@Ashley

Thanks for the reply.

My Bounce Behavior is using dt and all i did was multiply dt by time scale. I also disable the behavior when time scale == 0.

Keep up the good work, C2 is AMAZING.
B
17
S
9
G
7
Posts: 249
Reputation: 6,922


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 0 guests