playMaker

Author Topic: Changing speed of "Animate Float" action [SOLVED]  (Read 3556 times)

tim.holman

  • 1.2 Beta
  • Playmaker Newbie
  • *
  • Posts: 49
Changing speed of "Animate Float" action [SOLVED]
« on: November 17, 2011, 12:13:16 PM »
I have a gui slider that I'm animating using "Animate Float." I've set up the animation curve how I want it, but I need to change the speed at which it animates depending on the number of enemies around. I tried using "Set Animation Speed," but that only seems to apply to game objects that have animations outside of playmaker. Is there a way for me to manipulate the speed (at runtime) at which my Gui slider bar animates? The only way I've figured out to manipulate the speed is by modifying the animation curve itself, which I cannot do at runtime. Any ideas?
« Last Edit: November 30, 2011, 05:48:02 PM by alexchouls »

MaDDoX

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 165
    • FluidPlay Studios
Re: Changing speed of "Animate Float" action
« Reply #1 on: November 17, 2011, 04:33:29 PM »
Interesting question. First answer that pops into my mind is "don't use anim curves", ie. build your animation behavior in a separate fsm, having the wait duration between state updates controlled by a (possibly global) variable.

Thinking about it further though, these anim curves should definitely get a "multiplier" public variable to affect their speed. I haven't checked the code but it doesn't seem like anything tough to implement, and yet it'd be extremely useful to customize gameplay and animated feedback. Maybe make it a feature request?
--
Breno "MaDDoX" Azevedo
@brenoazevedo

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Changing speed of "Animate Float" action
« Reply #2 on: November 18, 2011, 11:06:53 PM »
I agree, a Speed Multiplier parameter would be a good addition to these actions. Will post some modified actions, and include in next update...

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Changing speed of "Animate Float" action
« Reply #3 on: November 30, 2011, 05:46:55 PM »
Actually Animate Float V2 and the other Animate actions already have a Speed parameter that does this!