[PLUGIN] Time manager

Post your completed addons to share with the community

Post » Fri Mar 23, 2012 5:32 am

Great stuff, works a treat.

Many thanks for the prompt reply!!
B
18
S
3
Posts: 12
Reputation: 1,617

Post » Mon Mar 26, 2012 8:10 am

I did some updates and added some new functions to the plugin.
The new version is 1.03.

I short, I added a "start", "stop" and "Destroy Time Manager instances" function to the plugin. I also cleaned up, and made the code better, and faster!

See first posting for more information and download link for the latest version, or click on the link below!

Original postCodeMasterMike2012-03-26 08:12:11
B
38
S
13
G
9
Posts: 151
Reputation: 8,437

Post » Tue Mar 27, 2012 3:02 am

   This plug-in is excellent and I recommend it to anyone that is having difficulty adding a timer to their game. My only complaint (not really a complaint) is that the seconds string doesn't go beyond 60 (90 for instance counts down from 30 and then from 60) and that the minutes string is read 00:00 as opposed to 0:00. There are a lot of strings there and maybe more would be too confusing for some, but I would prefer these additions.
   Of course, the author wrote a nice tutorial on adding in the timer manually where both of these "complaints" could be addressed.
   Thanks for the great plug-in. I use it and love it.
B
23
S
7
Posts: 79
Reputation: 2,215

Post » Tue Mar 27, 2012 7:23 am

@gamecherry

Its great to hear that you like the plugin and that it makes things alot easier for you.

Now to you requests:

The "problem" with the request to be able to show seconds that goes beyond 60, doesn't really make any sense, since time never goes beyond 59 seconds (60 seconds is really 0).

But I have already implemented a way to fix that in the plugin. Instead of getting the time string, you can get the numeric value from the counter instead, using the "GetTimeValue"-function.

This function returns the total milliseconds from the Time Manager counter.And with this value, you can calculate the seconds to go how far you now may want. And using the calculation:

int(GetTimeValue("labelName")/60)%90

The counter then counts the seconds up to 90, instead of 60. And you can change that 90 value into whatever you wish it to be.

It is a little more work than just getting a string, but this way you can alter the counter value in any way you want.

The issue, reading the hours with a single 0 instead of 00 is a easy fix, and I will fix that in the next update!
B
38
S
13
G
9
Posts: 151
Reputation: 8,437

Post » Tue Mar 27, 2012 10:22 am

@gamecherry and everyone else:

New update is online! The latest version is now 1.04!
I've Changed the expression value for Hours. Instead of showing double "00" when hours is under 10, now will Hours only display a single "0".

Now it will take a little time before I release the next update, which will be a larger update with some internal changes and improvements. But to make sure the backward compability is honored, it will take some time before I release it. So all next issues and features will be in the next update!

Thank you all for your support and feedback! CodeMasterMike2012-03-27 17:33:01
B
38
S
13
G
9
Posts: 151
Reputation: 8,437

Post » Thu Mar 29, 2012 12:02 pm

New update is online! The latest version is now 1.05!

This update changes some internal functions and names, and should have full backward compability! Some bigger updates are:

Change base variable for counter
In a normal counter a second consists of 1000 milliseconds, 1 minute of 60 seconds and one hour of 60 mins. If for whatever reason, you wish to change, so that 1 minute is no longer 60 seconds, but 90 seconds, now you can! Changing from the default values will alter the whole calculation, and a minute will not be added unless it has reached 90 seconds.

Choose how to display counter values
When hours, minutes or seconds come below 10 in value, then you can choose if you wish to have a double value (ex. 00, 09, 05) or a single value (ex. 0, 9, 5).

I hope this update will be of big use for all of you who uses this plugin. To get the whole change list and more information, go to the top original post and get the new update now!
Original post

Thank you everyone for your feedback, suggestions and support!
B
38
S
13
G
9
Posts: 151
Reputation: 8,437

Post » Wed Apr 04, 2012 2:53 pm

Hi

Is there a way I can say: for example:

If the time is <00:05:000 - Add 500 to Score?
B
11
S
2
Posts: 127
Reputation: 1,532

Post » Wed Apr 04, 2012 9:06 pm

@Pixiefingers

Yes, there is!
Call on the "GetTimeValue" expression, this expression will give you the current value of the counter (in milliseconds), with this value, you can check if its below a given value, in your example, 5 seconds would be 5000 (5 seconds al 1000 milliseconds). And if the "GetTimeValue" expression is bigger than that, then add 500 to score.

I hope this will work for you!
B
38
S
13
G
9
Posts: 151
Reputation: 8,437

Post » Thu Apr 05, 2012 10:23 am

It says "Unknown Expression"
B
11
S
2
Posts: 127
Reputation: 1,532

Post » Thu Apr 05, 2012 10:36 am

@Pixiefingers

Are you using the right label name?
See my simple example here, this example adds 500 points until the time is bigger than 5 seconds:

http://dl.dropbox.com/u/52716812/GetTimeValueExample.capx

If this isnt helping you, please add a capx file with the issue, so I can look closer on your problem.
B
38
S
13
G
9
Posts: 151
Reputation: 8,437

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: gamecorpstudio and 1 guest