[PLUGIN] Time manager

0 favourites
From the Asset Store
LevelsManager is a Construct 2 & 3 plugin to manage your worlds and levels easily
  • 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!<img src="smileys/smiley1.gif" border="0" align="middle">

  • Hi

    Is there a way I can say: for example:

    If the time is <00:05:000 - Add 500 to Score?

  • 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!

  • It says "Unknown Expression" <img src="smileys/smiley19.gif" border="0" align="middle" />

  • 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.

  • New update is online! The latest version is now 1.06!

    This update adds a function and a couple of expressions to the plugin, as you can read below:

    Check Counter Value

    This condition function you can compare your current Time Manager Counter, to see if its larger (>), smaller (<) or not equal (!=) to a NUMBER value (regarded as milliseconds). The condition returns true if the check state is correct, false otherwise.

    Convert NUMBER into a Time Manager string!

    It have might happen, where you just simly and fast want to convert a NUMBER variable into a Time String, and you dont wanna convert it yourself. But you dont have a counter to make the conversion for you. But now you do!

    The simple 8 different(!) expressions can easily convert your NUMBER value into a Time Manager string without the need to create a Time Manager counter! Just add the value into the expression and it will return a converted string to you directly, without any fuss!

    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! <img src="smileys/smiley1.gif" border="0" align="middle">

  • It would be nice if you could also add "Equal to" "Less or equal" and "Greater or equal" to check counter value.

  • The problem with using == as a condition, is that its practically impossible to exactly get a situation where the values are "equal", due to the time calculation is calculated in milliseconds, and the values can be very high. And since the engine doesn't run once per millisecond, a equal condition might never be true, because the update might have taken 1 millisecond too long to be a match.

    but I'm willing to test a equal condition, but its little different than a "ordinary" equal. I have added that if the time value is higher than the time at the previous update, and lower/equal to, than the current time during the current update, its considered equal and returns true.

    I don't know how well it will work, so this needs to be tested properly before it can be accepted into the final code. But I'm releasing it now anyway so you can test it and see how it works.

    I also added "Less or equal" and "Greater or equal" to the "Check counter value"-function.

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

    Check Counter Value

    I added '==', '<=' and '>=' to the conditions in this function.

    Although these conditions are still under testing (read above for more information), and they might change in later updates.

    Remove Single Counter

    his function removes a single counter from the Time Manager. I added this to get the option to remove unwanted timers that would only take up a spot in the Time Manager list and, in larger amount, more time to calculate active counters.

    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!

    Orginal post

    Thank you everyone for your feedback, suggestions and support! <img src="smileys/smiley1.gif" border="0" align="middle">

  • *Edit - Nevermind, got it

  • New update is online! The latest version is now 1.08!

    This update fixes a issue where other counters may have been resetted, that shouldn't be resetted when adding new counters to the plugin.

    I also added a new counter action, which allows you to set a "start value", so the counter starts at this value instead of default 0.

    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!

    Orginal post

    Thank you everyone for your feedback, suggestions and support! <img src="smileys/smiley1.gif" border="0" align="middle">

  • Can't get it working. I've copied all files into plugins\Time_Manager_1_08 folder but C2 doesn't see it. Tried to put into plugins\Time Manager, but still no luck.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • tecbug

    As with all plugins, you need to unzip the files and paste them into a folder under plugins. Then it will show up inside Construct 2.

  • Is there a possibility to add a value to a countdown? I saw how to add a value to another variable when the time is counting up.

    I would like to add 5 points and -5 points to a counting down time.

    If the time is 0 the layout changes.

    In this case I worked on so far the problem is that I collect points but the clock can not be 0 because it stops countding down on 5, if I collected 5 points.

    I understand why, but still didn?t find out how I can fix this.

    <img src="https://pbs.twimg.com/media/A4sPw92CUAAiNVH.jpg:large" border="0" />

    Here is a game screen of the problem.

    twitter.com/LintuSotaRauha/status/255315326441512960/photo/1

    Everyone can win. But it?s not the big target. Hehe. :)

    <img src="https://pbs.twimg.com/media/A4sP78rCYAEvym4.jpg:large" border="0" />

    Points are on the left and time is on the right corner.

  • LintuSotaRauha

    first of all i recommend you to use the plugin instead of the old tutorial version. the plugin is much easier and faster to use.

    if i really understand your issue, you need to take the current time value that you have, and add your points to that and restart the counter with the new time value.

    at the moment i cant add a add/subtract function to the plugin beacuse i dont have time for it. and i wont have any time for the next several months either. but i will add it to the wishlist.

  • Thank you very much. I will be patient.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)