playMaker

Author Topic: Add float/int up to a value with transition effect.  (Read 815 times)

Aaddiction

  • Junior Playmaker
  • **
  • Posts: 85
    • View Profile
Add float/int up to a value with transition effect.
« on: June 13, 2014, 01:36:02 AM »
Hello, would be great if someone makes or share the following action:

A transition effect for adding up a given number to a value.

When you add 15 to a int with 100 to have a n amount of time of counting that number up. Similar to add but doing it gradually.

Example parameters:
- value to add up to or remove from
- transition time
- event to send

Cheers.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: Add float/int up to a value with transition effect.
« Reply #1 on: June 13, 2014, 03:07:46 AM »
Hi,

 Use a tweening engine for this, they exists exactly for this. iTween, internal PlayMaker animation actions, or other engines suppported by PlayMaker from the wiki?

Have you tried already?

Bye,

 Jean

Aaddiction

  • Junior Playmaker
  • **
  • Posts: 85
    • View Profile
Re: Add float/int up to a value with transition effect.
« Reply #2 on: June 13, 2014, 09:22:08 AM »
Sorry, but I can not wrap around which iTween action/combination to use in order to manipulate float vars. I've been using it only for moving/rotating objects so far.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: Add float/int up to a value with transition effect.
« Reply #3 on: June 18, 2014, 11:51:59 AM »
Hi,

 Use "animate float" action. it's based on a curve so you can do anything you want.

You can use hotween. I created actions for this, and several that simply tween Fsm variables, so that would be good for you too here as well.

http://hutonggames.com/playmakerforum/index.php?topic=2299.msg10104#msg10104

Bye,

 Jean