Help with Lives +1 after 30mins Realtime
mohanlalljason
Member Posts: 5
Hi everyone my name's Jason. I would really appreciate if someone could help me out.
I have 1 heart that I replicate so I have 3 lives and I understand how to -1 life when game over. What I need help with is getting +1 life after 30 minutes realtime from the device clock. So it checks the current time when -1 life. Thanks in advance.
Comments
There is a number of ways you can do this but here is a quick sample of how you can detect the device clock and award something when a preset time has lapsed. The project is set to 3 seconds (So you can see the result without waiting 30 minutes!) but you can change this to any amount of time IN SECONDS. So if you changed the self attribute from 3 to 1800 this would award a new life every 30 mins (1800 seconds). Hope this helps!
Wow thanks I will try it when I get home, so excited to set this up!
Hi I played around with this already it's too confusing for me to understand there are so many actors in the background.
Is it possible you could modify it for me and delete what's not needed? I only need minutes, I would like to show 30:00 then countdown 29:59..
Please help me I am really struggling with this timer.
I don't mind paying a few dollars for your help. With a more indepth explanation and if you can give me a sample that I could easily add myself to my project that's already setup the way I want it.
Here you go!
if you still struggle copying this to your project you can always contact me on:
damien@gingagaming.com
I do charge for freelance work but something like this is quick work.
Best regards
Damien
It worked 100% thank you very much!!
So if there is a 30 minute timer, but the user exits the game before the timer ends, if he comes back in after 40 minutes, he gets life immediately?
You also have to use the save and load attribute function aswell to save the time he lost 1 heart and say you exit the game or go to next level you can load the last time that was on the counter.
After 30mins you immediately get a heart.
Actually I was able to save my lifes and load it at restart but not the device time. Can someone help with that? @gingagaming
I believe that after the first attribute change, you have to put Load Entry Time Stamp first and Save Entry Time Stamp after.
I believe that entering after 30 minutes you will find an active life
However, if you entered after 2 hours you would always find only one life and not 4 lives.
I was playing around with this last night at like 4am and couldn't get the time to save. Were you able to get it working @UltraLionBlu? :)
I will switch the position my save and load are in to load then save and see if that helps thanks.
I tried swapping them around but it didn't work for me.
I just edited it like that
I added a second scene and a button in each scene to move from one to the other
I have seen that when I return to the scene with the timer when the time has passed I find the extra life.
My pro month has expired and now I can't test to see if closing and opening the game works the same on my smartphone. If you can verify let me know, I'm interested in this mechanic too
Okay so I set it up like that in a group just now and it worked but stopped working once the lives were restored. I couldn't lose any more lives.
At the end of the rule use a timer every 0 seconds change attribute Entry Time Stamp