C2 Plugin: Clock

Post your completed addons to share with the community

Post » Thu May 05, 2011 2:11 am

EDIT: The version posted below was made with an old version of C2's SDK it will not work in current versions. For a version that works please see septeven's fix here.

This is a simple plugin that will let you incorporate real time into your programs. I believe there was a person or two who wanted it. I must say, this was quite the fun learning experience. I was rather alienated with C1's method of developing plugins.So being able to take a notepad and make something felt kind nice. Anyway, enjoy.

Plugin comes with expressions for: Millisecond, Second, Minute, Hour, Date, Day of the Week, Month, and Year.

Plugin/Example Cap
https://dl.dropboxusercontent.com/u/103 ... lockv1.rar

Web Example
https://dl.dropboxusercontent.com/u/103 ... index.html

Notes:
-No actions or conditions, just expressions
-This is a gutted mouse. Let me know if any of parts are still squeaking
-Javascript also has built in codes for UTC time, timezone offset, and preformated strings. Anyone want?
Last edited by Yarfapet on Thu Apr 17, 2014 12:43 am, edited 2 times in total.
B
51
S
10
G
7
Posts: 184
Reputation: 6,825

Post » Thu May 05, 2011 2:25 am

Nice! Glad you found it straightforward to make a plugin.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Fri May 06, 2011 2:10 pm

This might be an offtopic but, where in this forum can I find a tutorial to make plugins for C2? I have a background for programming so I don't think I'm going to have too much trouble (hopefully :lol: ) So to kill time when I'm not doing anything, I'd like to explore the plugin universe.
B
10
S
5
G
8
Posts: 203
Reputation: 4,395

Post » Fri May 06, 2011 2:48 pm

There's a sticky here, but that's all there is right now. Post a thread if you get stuck and someone might be able to help!
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Fri May 06, 2011 5:33 pm

Thanks Ash! I'll take a look at it!
B
10
S
5
G
8
Posts: 203
Reputation: 4,395

Post » Sun Jan 22, 2012 3:37 pm

When i try to use the plugin by running the game in my chrome browser it replies the message

Assertion failure: cr.plugins not created

Stack trace
Error
At error (unknown source)
At assert 2 (http://localhost:5000/preview_prelude.js:12:10
At http://localhost:5000/Clock_plugin.js:3:1

I could use your help.
B
56
S
20
G
13
Posts: 778
Reputation: 13,204

Post » Mon Jan 23, 2012 2:45 am

Yeah...I have no idea.

This plugin was made way back at Revision 33 (Current: 76), and was mostly me just screwing around with a code I had next to no idea how to use. I'm guessing since then, a few things may have changed with Construct 2.

I'll try giving it a look sometime this week, but the only way I could really see myself "fixing" this would be to, gut the mouse plugin again, and remake the plugin. Which I currently do no have a lot of time to do.

My sincerest apologizes

If anyone else would like to jump in, be my guest. Wouldn't be surprised if it was something really simple.
B
51
S
10
G
7
Posts: 184
Reputation: 6,825

Post » Fri Feb 03, 2012 8:58 am

Hello Yarfapet!
Was there any upgrades to your plugin?

I started a simple sketch that need to check the player's clock for day/night events :)
B
107
S
40
G
10
Posts: 456
Reputation: 13,202

Post » Tue Apr 10, 2012 6:49 pm

I updated this plugin. It seemed to be done with an old sdk.
Enjoy ;)
septeven2013-01-08 19:04:23
B
44
S
12
G
13
Posts: 628
Reputation: 10,471

Post » Thu Apr 12, 2012 3:58 pm

Thank you very much sir.
B
51
S
10
G
7
Posts: 184
Reputation: 6,825

Next

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 5 guests