playMaker

Author Topic: Playmaker Time Reward[SOLVED]  (Read 2450 times)

Mysonye

  • Playmaker Newbie
  • *
  • Posts: 15
Playmaker Time Reward[SOLVED]
« 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 :)
« Last Edit: April 15, 2020, 02:02:13 AM by jeanfabre »

heavygunner

  • Sr. Member
  • ****
  • Posts: 344
Re: Playmaker Time Reward
« Reply #1 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

 ;)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Playmaker Time Reward
« Reply #2 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

Mysonye

  • Playmaker Newbie
  • *
  • Posts: 15
Re: Playmaker Time Reward
« Reply #3 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 :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Playmaker Time Reward
« Reply #4 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

Mysonye

  • Playmaker Newbie
  • *
  • Posts: 15
Re: Playmaker Time Reward
« Reply #5 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)

Mysonye

  • Playmaker Newbie
  • *
  • Posts: 15
Re: Playmaker Time Reward
« Reply #6 on: April 03, 2020, 03:33:11 AM »
Its unpossible?  :-\

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Playmaker Time Reward
« Reply #7 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

Mysonye

  • Playmaker Newbie
  • *
  • Posts: 15
Re: Playmaker Time Reward
« Reply #8 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?

« Last Edit: April 03, 2020, 05:57:15 PM by Mysonye »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Playmaker Time Reward
« Reply #9 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



Bye,

 Jean


Mysonye

  • Playmaker Newbie
  • *
  • Posts: 15
Re: Playmaker Time Reward
« Reply #10 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