playMaker

Author Topic: [solved] Request : iTween ValueTo  (Read 3021 times)

sP0CkEr

  • Playmaker Newbie
  • *
  • Posts: 25
    • View Profile
[solved] Request : iTween ValueTo
« on: April 15, 2011, 09:08:55 PM »
Maybe I missed it, by I dont see that as one of the Actions available today.
« Last Edit: April 16, 2011, 04:06:55 PM by sP0CkEr »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3207
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Request : iTween ValueTo
« Reply #1 on: April 15, 2011, 09:50:22 PM »
There area a bunch of ways to animate variables in the AnimateVariables category (using animation curves and easing functions). These should give you the same functionality as ValueTo...

sP0CkEr

  • Playmaker Newbie
  • *
  • Posts: 25
    • View Profile
Re: Request : iTween ValueTo
« Reply #2 on: April 16, 2011, 01:08:23 PM »
OK, I feel kind of dumb now. Anyway, having some trouble using this Action. I am trying to animate the score value in my game. I see the value going up in debug, but how do i capture the value in every frame to update the score on my gui?

- spocker

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3207
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Request : iTween ValueTo
« Reply #3 on: April 16, 2011, 01:42:42 PM »
Not sure how you have things set up, but I would make an FSM just to display the score. You'll need to convert it to a string using Convert Int To String (hopefully we'll make string conversions automatic in a future update), then display this string with a GUI action. Lots of ways to do this. One way is to make a GUIText game object, position it where you want the score to be on screen, then use Set GUI Text, every frame, to display the score. You could even put the Scorekeeper FSM on this GUIText object...

sP0CkEr

  • Playmaker Newbie
  • *
  • Posts: 25
    • View Profile
Re: Request : iTween ValueTo
« Reply #4 on: April 16, 2011, 04:06:24 PM »
Thanks Alex. I was just about to come on and edit my message that I figured it out. The Action you suggested works perfectly. I will mark this as solved.

- spocker