How do I pause/restart a timer object (regular)

Get help using Construct 2

Post » Mon Nov 21, 2016 7:16 pm

I've tried every workaround that I can think of and nothing seems to work.

Any help would be appreciated!
B
62
S
20
G
56
Posts: 1,077
Reputation: 36,021

Post » Mon Nov 21, 2016 10:05 pm

Image
B
30
S
9
G
3
Posts: 171
Reputation: 3,334

Post » Mon Nov 21, 2016 10:25 pm

If time scale is set to 0, the timer object pauses, but when timescale is set back to 1 (or reset to whatever it was originally on) the timer object starts over. That doesn't seem right. Anyone else have this issue or am I missing something?
B
62
S
20
G
56
Posts: 1,077
Reputation: 36,021

Post » Tue Nov 22, 2016 6:41 am

@gameglaux thanks for the link but I can't get the plugin to work. I keep getting an error on opening C2, even with the dependent plugins properly loaded.

There has to be a way for the default timer to not restart itself though, right?
B
62
S
20
G
56
Posts: 1,077
Reputation: 36,021

Post » Tue Nov 22, 2016 10:42 am

@Burvey rexs timer plugin has a dependency plugin that needs to be installed as well to work: http://c2rexplugins.weebly.com/rex_timeline.html

Without in-built pause/restart you could alway save the current time in a variable then start the timer again with the original target time minus that variables current time.
Image
B
30
S
9
G
3
Posts: 171
Reputation: 3,334

Post » Tue Nov 22, 2016 3:41 pm

@gameglaux like I said, I have rex_timeline installed already and I still get an error unfortunately. I wish I could get it to work because his timer would be quite useful.

Here is the error I'm getting:
Unable to load plugin in 'C:\Program Files\construct2\exporters\html5\plugin\rex_timer\': Found 'GetPluginSettings' global, but it is not a function
This plugin will not be available in the editor.


Saving the time in a variable and restarting the timer was the first thing I tried. It didn't work.
B
62
S
20
G
56
Posts: 1,077
Reputation: 36,021

Post » Tue Nov 22, 2016 5:47 pm

@Burvey ah, maybe you could just roll your own timers using this tutorial?

https://www.scirra.com/tutorials/450/timers?page=1
Image
B
30
S
9
G
3
Posts: 171
Reputation: 3,334

Post » Tue Nov 22, 2016 6:12 pm

@gameglaux haha, we think alike. That's what I ended up doing (making my own timer). Thanks for your input, I appreciate it.
B
62
S
20
G
56
Posts: 1,077
Reputation: 36,021


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests