playMaker

Author Topic: Tweening after Activation?  (Read 2401 times)

Mayhem

  • Full Member
  • ***
  • Posts: 171
Tweening after Activation?
« on: January 10, 2013, 05:29:06 AM »
Hey there guys,

i really like to work with PlayMaker, it's a great tool, but sometimes there are just some little problems i just can't figure out.

So, i have my GUI built with nGUI (that's not the revelant part :D, just a side-information) and have a simple Pause-Button in the Upper-Left.

So, when this Button is Touched the game is, yeah, paused. I am doing this by manipulating the Time Scale (just for now, if there is a more elegant way, i would like to hear it!) via a FSM which is attached to this Button.

Now, there is another thing. When this Button is pressed, a little Option Menu (you know, a little Panel with three Buttons "Resume", "Options", "Exit Game") should move from the button to the Mid-Screen.
(This Little Menu is a seperate nGUI-Panel in the same scene, such as the whole GUI is )
I am achieving this also via an FSM, which is attached to the Panel (it's the parent object, the UIImageButtons are children), with a simple "iTween Move To"-Action, where i specify the Position. This works well, when the Menu-Object is activated.

BUT i am deactivating it. SO my Pause-Button in the Upper-Left has 2 Tasks/Actions:

- Pause the Game
- Activate the other Menu

I am doing this with the simple "Activate GameObject"-Action, which works quite well. But after the Activation, the Pause-Menu doesn't do anything. It doesn't move towards the certain position, it stays on it's spot.

I tried also this:

- Gave my Pause-Button a "Send Event"-Action where he fires a custom Event "PauseMenu_Activation" to the Menu-Object

- The Menu-Object has two States:

1. State with no Actions but one Transition-Event "PauseMenu_Activation"
2. State where the iTween-Action is performed

The weird thing is, i looked up in the FSM Window, and the Object goes into the second state of my Menu-Object (the State has a green box and the Action, too!), but it doesn't execute the iTween-Action.

Why is that? Where's my mistake?

Mayhem

  • Full Member
  • ***
  • Posts: 171
Re: Tweening after Activation?
« Reply #1 on: January 11, 2013, 04:56:44 PM »
No ideas, guys? :/

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Tweening after Activation?
« Reply #2 on: January 17, 2013, 01:42:44 AM »
Hi,

 iTween can be tricky to work out sometime.

Now, given your description, I guess since you have paused the game, nothing will move anymore isn't it, Unity time is frozen, most of it anyway.

 have you tried to check "real time" in your iTween action?

bye,

 Jean