Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Mysonye on March 14, 2020, 08:17:31 PM
-
Hello team,
I have the following problem.
I want to add time to my game.
Procedure:
I click the button, reward should come in 4 hours 30 minutes.
I've already used "get system date time" and get timespan between dates.
I get current time. how can I add 4 hours 40 minutes or other time so that MM / dd / yyyy HH: mm: ss remains
Thanks :)
-
There is an action in ecosystem called countdown timer.
And to format time check this post
https://hutonggames.com/playmakerforum/index.php?topic=1711.0
;)
-
Hi,
there is a "AddToDateTime" custom action on the Ecosystem, I think this is what you need here. if the application goes into the background, your time will remain true, while if you use a countdown, it expects that the app stays active during the countdown.
Bye,
Jean
-
jeanfabre Thank you very very much! Its helped me!
pity that only time HH: MM: SS works. the format MM / dd / yyyy HH: mm: ss -does not work :( time does not work have you a tip for me?
Thanks :)
-
Hi,
it should.
Can you show have you in your fsm? what is the timestamp value you want to format?
Bye,
Jean
-
Thank you for your answer.
So: I want to do it like this:
Button-1 clicked
call current date / time
(MM / dd / yyyy HH: mm: ss)
add only time
Result / store
MM / dd / yyyy HH: mm: ss added only time
or
Button 1 clicked
call time and date
MM / dd / yyyy HH: mm: ss
add time example 26 hours
result / store
MM / dd / yyyy HH: mm: ss
new time new date (next day)
-
Its unpossible? :-\
-
Hi,
it's totally possible, can you send me a package of the Unity scene, not just the scene itself, thanks.
Bye,
Jean
-
Thank you, i hope you can help me ;)
here is a link for my Scene
https://easyupload.io/59lcg3
Password is: playmaker
its right?
-
Hi,
ok, few things:
- dateformat must be consistent, so putting "MM/dd/yyyy HH:mm:ss" all all formats for datetime works fine.
- converting string to seconds, is another format, more infos here:
https://hutonggames.com/playmakerforum/index.php?topic=1711.0
(https://i.imgur.com/RcIUzag.png)
Bye,
Jean
-
Jeanfabre Thank you very very much!
(It worked!!
"/" has to change in date format.
MM/dd/yyyy HH:mm ==> MM-dd-yyyy HH:mm
MM/dd/yyyy HH:mm has in add to date time not worked..
Thank You!
#Can be closed
:) ;) :D