[plugin] rex_stopwatch

Post your work in progress addons and get feedback

Post » Sun Mar 29, 2015 4:43 am

A simple plugin to accumulate escaped time.
Document, plugin and sample capx are included.
B
108
S
26
G
250
Posts: 4,404
Reputation: 141,125

Post » Mon Mar 30, 2015 9:16 am

Would it be possible to use this plugin even if timescale were to be set to zero?
Edit: Ah nevermind, I guess it's just a matter of setting object timescale for the Stopwatch.
B
38
S
20
G
18
Posts: 152
Reputation: 12,166

Post » Mon Mar 30, 2015 10:41 am

@purplemonkey

Yes, set the object's timescale to 1 to keep it running while global timescale is 0.
B
108
S
26
G
250
Posts: 4,404
Reputation: 141,125

Post » Fri Jul 24, 2015 3:46 pm

Very useful function especially with the timescaling independent of system time. This seems to error out when I try to save state with it running though. Any advice/fix please?

To duplicate -just add an action: System>'Save game to slot "mysave"

Error message: Uncaught TypeError: this.timers.saveToJSON is not a function
(line 179, col 39)
B
5
S
1
Posts: 20
Reputation: 415

Post » Fri Jul 24, 2015 3:52 pm

@HelmetPIg

Thanks. I had fixed it, please download and try again.
B
108
S
26
G
250
Posts: 4,404
Reputation: 141,125

Post » Sat Jul 25, 2015 5:21 am

Works perfectly now, thank you so much for your amazing plugins!
B
5
S
1
Posts: 20
Reputation: 415

Post » Sun Jul 26, 2015 1:15 am

@rexrainbow Hm, follow-up error here. Saving is fine, but trying to load a saved game (with the stopwatch plugin active) causes an error in the plugin. Any help would be appreciated!

Uncaught ReferenceError n is not defined
line 168, col29
B
5
S
1
Posts: 20
Reputation: 415

Post » Sun Jul 26, 2015 2:24 am

@HelmetPIg

Fixed. Sorry for this mistake.
B
108
S
26
G
250
Posts: 4,404
Reputation: 141,125

Post » Sun Jul 26, 2015 5:08 am

Message: HelmetPIg is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
Hm, now the error reads:

Cannot read property '0' of undefined
line 168, col 28

Uploaded a very quick test capx here if you needed to see it (I click to run the timer, then click button to save/swap layouts, then click again to try to load the save)
B
5
S
1
Posts: 20
Reputation: 415

Post » Sun Jul 26, 2015 6:49 am

@HelmetPIg

Fixed. Please try again.
B
108
S
26
G
250
Posts: 4,404
Reputation: 141,125


Return to Work in Progress Addons

Who is online

Users browsing this forum: No registered users and 0 guests