Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Mysonye on March 14, 2020, 08:17:31 PM

Title: Playmaker Time Reward[SOLVED]
Post 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 :)
Title: Re: Playmaker Time Reward
Post by: heavygunner on March 14, 2020, 10:53:52 PM
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

 ;)
Title: Re: Playmaker Time Reward
Post by: jeanfabre on March 17, 2020, 04:51:54 AM
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
Title: Re: Playmaker Time Reward
Post by: Mysonye on March 27, 2020, 03:35:52 PM
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 :)
Title: Re: Playmaker Time Reward
Post by: jeanfabre on March 30, 2020, 02:35:11 AM
Hi,
 
it should.

Can you show have you in your fsm? what is the timestamp value you want to format?

Bye,

 Jean
Title: Re: Playmaker Time Reward
Post by: Mysonye on March 31, 2020, 05:28:15 AM
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)
Title: Re: Playmaker Time Reward
Post by: Mysonye on April 03, 2020, 03:33:11 AM
Its unpossible?  :-\
Title: Re: Playmaker Time Reward
Post by: jeanfabre on April 03, 2020, 03:45:27 AM
Hi,


 it's totally possible, can you send me a package of the Unity scene, not just the scene itself, thanks.

Bye,

 Jean
Title: Re: Playmaker Time Reward
Post by: Mysonye on April 03, 2020, 03:19:29 PM
Thank you, i hope you can help me ;)

here is a link for my Scene

https://easyupload.io/59lcg3


Password is:  playmaker



its right?

Title: Re: Playmaker Time Reward
Post by: jeanfabre on April 06, 2020, 03:37:09 AM
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

Title: Re: Playmaker Time Reward
Post by: Mysonye on April 06, 2020, 09:28:31 AM
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