playMaker

Author Topic: Time scale and animations..  (Read 7191 times)

ShreddinPB

  • Playmaker Newbie
  • *
  • Posts: 4
Time scale and animations..
« on: May 15, 2012, 06:27:47 PM »
Hey guys, So I have my whole menu fsm working.. I love how easy it was to do in playmaker!
My problem is this.
I have a simple pause system setup. Everything seems fine except for one part. When in game, you click the pause button, in the FSM it uses a "Play Animation" action to move the NGUI menus around using standard animation clips. After it moves the menu on screen it uses the Time Scale Action to set the time scale to 0.
Right now there are only two buttons, Exit and Resume. If you click Resume, it goes to a state where it then moves the menus off screen and sets the time scale to 1 again.
If you click Exit it normally would take you to a confirm exit screen with a Yes and No button using the same "Play Animation" type actions, however, nothing happens. I added a debug to the buttons and they print the message when  they are clicked, so those still work. If I add a time scale action of 1 to the beginning then the menus come back up, but then your game is running again.

I guess the simple question is, is there a way to have the fsm play a standard unity animation independent of time scale (like how you can do it with iTween).

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Time scale and animations..
« Reply #1 on: May 20, 2012, 02:46:09 AM »
I don't think there's a built in way to do this in Unity, but you could try manually stepping though the animation with Set Animation Time...

Mark_T

  • 1.2 Beta
  • Junior Playmaker
  • *
  • Posts: 72
Re: Time scale and animations..
« Reply #2 on: May 20, 2012, 05:54:37 AM »
This is not an answer to your question, but it might help.
I remember I used a pretty complicated work-around for a similar situation and I was thinking if instead setting the time scale to zero, maybe you can use Pause Controller. I didn`t used it yet, but maybe you can ask the developer.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Time scale and animations..
« Reply #3 on: May 20, 2012, 07:23:46 PM »
Try using a Float Interpolate and Set Animation Time to animate in realtime.