Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: tim.holman on November 17, 2011, 12:13:16 PM

Title: Changing speed of "Animate Float" action [SOLVED]
Post by: tim.holman 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?
Title: Re: Changing speed of "Animate Float" action
Post by: MaDDoX 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?
Title: Re: Changing speed of "Animate Float" action
Post by: Alex Chouls 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...
Title: Re: Changing speed of "Animate Float" action
Post by: Alex Chouls 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!