Join our Discord Channel
Hey Jean, How would you reverse this action so it would count down from a value ie 10 mins/ 600 secs?
Hi, Following a post: http://hutonggames.com/playmakerforum/index.php?topic=1700.msg7433#msg7433please find a convenient action that will convert seconds into a formated string to display, days, hours, minutes, seconds, milliseconds, total days, total hours, total minutes, total seconds, total milliseconds. It's very easy to use. For example, store the time since level load in a float using the action "get time info" and then inject that float in this action and specify a string variable to output AND the format. example:{1:D2}h:{2:D2}m:{3:D2}s:{4:D3}msif the float is 10, it will show: 00h:00m:10s:000ms{1:D1}:{2:D2}:{3:D2}if the float is 10, it will show 0:00:10[EDIT]I have added a tenth variable that will simply output the milliseconds with two digits, as the current c# formatter do not really allow for a simple way out. the default example is provided with it. Simply inject the "Time since level load" from the action "Get Time info" to see it in action.careful with the total X values, as they are doubles, so if you want to display the total number of seconds format it like so: {8:F0}http://stackoverflow.com/questions/463642/c-what-is-the-best-way-to-convert-seconds-into-hourminutessecondsmillisecohttp://msdn.microsoft.com/en-us/library/dwhawy9k.aspxIf you have any questions, don't hesitateBye, Jean