playMaker

Author Topic: Ease Float is acting inconsistently [SOLVED]  (Read 2007 times)

homeworld

  • Playmaker Newbie
  • *
  • Posts: 39
Ease Float is acting inconsistently [SOLVED]
« on: September 26, 2017, 07:59:19 PM »
Hi! I'm trying to make a healing mechanic where the player hits a key, loses one unit of healing resource, and incrementally gains 20hp; i tried using an "ease float" action combined with a "wait" action in order to cause the HP to regenerate incrementally slower as it goes towards the +20 goal:



Unfortunately, this seems to act very unreliably: sometimes it works as intended, quickly ramping up from 0 to 10hp and then slowly trickling in the remaining 10hp, and other times it just quickly bumps up the whole 20hp;

Here's a video of it in action, keep your eye on the HP counter in the top-left:

http://danbkp.myqnapcloud.com/Web/2017-09-27_02-49-25.webm

I have no idea why this is happening; what am i doing wrong? Any insight or alternatives are very welcome!
« Last Edit: September 27, 2017, 06:40:13 PM by homeworld »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Ease Float is acting inconsistently
« Reply #1 on: September 26, 2017, 10:51:50 PM »
Hi,
I don't it's a good thing the ease the time float.

instead try ease the hp.

Get the old hp in a variable then add the increase an store in another variable.
Then use ease float from old hp to new hp.
and change the ease type to the preferred type (play around with it to see whats best)

homeworld

  • Playmaker Newbie
  • *
  • Posts: 39
Re: Ease Float is acting inconsistently
« Reply #2 on: September 27, 2017, 03:40:30 AM »
Hi, thanks for the reply! Unfortunately i can't ease the hp directly in this scenario because of a few reasons, chief among them being: the easing process should take somewhere around 3-4-5 seconds, during which the player should be able to receive extra damage, even if the healing system slowly regenerates him; is using time for something like this inherently unreliable?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Ease Float is acting inconsistently
« Reply #3 on: September 27, 2017, 12:45:59 PM »
Hi,
Actually changing the 'from value' and 'to value' when the action is active wont do anything.

But you can change the time or speed while the action is running to speed up or slow down.

homeworld

  • Playmaker Newbie
  • *
  • Posts: 39
Re: Ease Float is acting inconsistently
« Reply #4 on: September 27, 2017, 06:39:57 PM »
Thanks for the heads up! I messed around with it some more, but ended up realizing that i can just skip the easing entirely! Simply adding 15 miliseconds to the wait for every point of HP pretty much gave me the effect i was looking for

Thank you very much for the replies!