playMaker

Author Topic: Animated Score Counter?  (Read 2623 times)

brixX

  • Playmaker Newbie
  • *
  • Posts: 3
Animated Score Counter?
« on: September 07, 2014, 11:20:34 AM »
Hi :)

I'm wondering how to create an animated score counter with playmaker? Let's say you have a global variable "score" (float) which is at "0". As the player hits - for example - an object, the score should increase by "10".

By adding "10" to the current score of "0", the score will popup immediately to "10" and the GUIText element will also popup immediately and show "10" instead of "0".
So how can the addition be animated over a given time to get a smoother feeling of what's going on? In this example the GUIText should not simply change but count up from the old score to the new.

Thanks!
 

Neoisrael

  • Playmaker Newbie
  • *
  • Posts: 34
Re: Animated Score Counter?
« Reply #1 on: September 07, 2014, 11:24:29 AM »
Im preety sure theres an action for that...
Animate float i think but there are others...
U set ur starting float and the end float and choose the time that u want it to go from one to the other... Hope it helped :)

Neoisrael

  • Playmaker Newbie
  • *
  • Posts: 34
Re: Animated Score Counter?
« Reply #2 on: September 07, 2014, 11:31:54 AM »
The other way you could do this is check for float change
Then take the number and compare it to thescore after the change and add to the score beforechange 0.1 until it maches the needed score... I advice to use ints... Less room for errors

jess84

  • Hero Member
  • *****
  • Posts: 515
Re: Animated Score Counter?
« Reply #3 on: September 07, 2014, 12:09:17 PM »
The action you're looking for is Float Interpolate.

(there's also an Int Interpolate)

Lars Steenhoff

  • Beta Group
  • Playmaker Newbie
  • *
  • Posts: 46
Re: Animated Score Counter?
« Reply #4 on: February 13, 2016, 04:49:40 AM »
I see there is an ease in / easy out option.

Could you make an ease out only option?

so it s starts fast and slow down.