playMaker

Author Topic: Candy Crush Heart System?  (Read 3654 times)

Budde88

  • Full Member
  • ***
  • Posts: 161
    • View Profile
Candy Crush Heart System?
« on: January 09, 2015, 04:40:10 AM »
It's something I have been trying to implement for a while now, with no success unfortunately.

Has anyone been able to replicate Candy Crush Heart System?

Example: 1) I have 5 Lives, and my Countdown Timer is on 30 minutes.
               2) I lose 1 Life and the Countdown Begins.
               3) I close my Application/Game, and open it up 10 minutes later.
               4) My Lives now show a value of 4, and my Timer is on 20 minutes.

I'm not asking for someone to set all of this up for me (Thats just silly), maybe just point me in the right direction of how this can be done within playmaker - Tutorial/Pre-made Example.

Many Thanks

Budde88

  • Full Member
  • ***
  • Posts: 161
    • View Profile
Re: Candy Crush Heart System?
« Reply #1 on: January 12, 2015, 10:31:37 AM »
Any Help would be much Appreciated.

Budde88

  • Full Member
  • ***
  • Posts: 161
    • View Profile
Re: Candy Crush Heart System?
« Reply #2 on: January 16, 2015, 04:22:16 PM »
Anyone out there? I don't Bite... hard

mweyna

  • Full Member
  • ***
  • Posts: 242
    • View Profile
Re: Candy Crush Heart System?
« Reply #3 on: January 16, 2015, 05:03:28 PM »
So I've built timers that survive app closure, but it isn't easy. Basically you need to write the system time into a string, save out that string to a file (I use EasySave), then on start, load in the file and compare the time difference to however fast you're regeneration is.

There really isn't any premade thing I could point you to. In my project I have an FSM which purely gets the system time, another FSM that writes all my variables I care about via EasySave, another FSM that loads everything, and then my actual object FSM that gets those variables from my load manager.

mweyna

  • Full Member
  • ***
  • Posts: 242
    • View Profile

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12342
  • Official Playmaker Support
    • View Profile
Re: Candy Crush Heart System?
« Reply #5 on: April 23, 2015, 10:02:45 PM »
Hi,

 also, use the real date time of the device for your timer to take in account the time when application is paused.

 Bye,

 Jean

Budde88

  • Full Member
  • ***
  • Posts: 161
    • View Profile
Re: Candy Crush Heart System?
« Reply #6 on: July 02, 2015, 06:59:16 AM »
Only saw these replies now, I managed to get in touch with the developer of another plugin called 'Time Cheat Prevention' he was kind enough to build all the actions for me and make his plugin Playmaker friendly. You should probably add it to the wiki List.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 2262
    • View Profile
    • jinxtergames
Re: Candy Crush Heart System?
« Reply #7 on: July 02, 2015, 07:13:37 AM »
Hi,
I checked on the asset store, but i don't think they are included yet on the asset store version (nothing was mentioned in the description)

please bump when they are added on the asset store
(or ask the developer to bump when updated)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12342
  • Official Playmaker Support
    • View Profile
Re: Candy Crush Heart System?
« Reply #8 on: July 17, 2015, 02:48:23 AM »
Hi,

 yeah, if you have a link that would be great.

Bye,

 Jean

Budde88

  • Full Member
  • ***
  • Posts: 161
    • View Profile
Re: Candy Crush Heart System?
« Reply #9 on: August 11, 2015, 03:25:00 AM »
I don't have a link, but if you give me your e-mail address I can send them to you Jean. I currently have it working like an absolute charm in my project.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 2262
    • View Profile
    • jinxtergames
Re: Candy Crush Heart System?
« Reply #10 on: August 11, 2015, 07:02:22 AM »
Hi,
if you want you can use export package...
i can be found under Assets (top left of unity screen)
Mark only those actions for the 'Time Cheat Prevention' asset,
then export.
And then you can attach it to your reply
(click on the + next to "Attachments and other options" then choose the file and post)

Budde88

  • Full Member
  • ***
  • Posts: 161
    • View Profile
Re: Candy Crush Heart System?
« Reply #11 on: August 12, 2015, 10:24:30 AM »
Ok so here are the Playmaker Actions for Time Cheat prevention. It's only the Actions of course, and you will need to buy the plugin for them to work.
I would recommend this package to everyone reading this post, the developer really went out of his way making these actions for me.

Please enjoy, and if anyone could help me on my pullback and release shooting mechanism for 2D Touch and Mouse, I would be forever grateful.

@ jeanfabre, be sure to add this to the ecosystem to help this lad get his plugin sold more.