playMaker

Author Topic: Playmaker + NGUI TweenAlpha [Solved]  (Read 6843 times)

Yanifska

  • Full Member
  • ***
  • Posts: 163
    • My Portfolio
Playmaker + NGUI TweenAlpha [Solved]
« on: November 16, 2013, 01:12:10 PM »
Hi,

I am trying to use the tweenalpha script packaged with NGUI.
I got it working once but I can't find a way to start it over.
For example, When I instance the NGUI Sprite, the tweenalpha will run automatically, so my sprite will fade in, but I can't make it fade out, and then fade in again on command when needed.
I tried to use set property with some of the property, but I can't find a property "Play" for example, and when using the "Enabled" property it will just pop without animation.
I need also to access the OnFinished event but for now it will take only a script.

Could you make a custom action for this one, or provide any help with it, Maybe there are just other ways to animate the opacity of an ngui object.
I really need to be able to play the tween on demand, set To and From and catch the finished event.

Thank you
Yaniv
« Last Edit: November 18, 2013, 03:46:08 AM by Yanifska »
Visit my portfolio: http://www.yanivcahoua.com/

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Playmaker + NGUI TweenAlpha
« Reply #1 on: November 18, 2013, 02:13:16 AM »
Hi,

 what custom action are you using for this? nGuiPlayTween gives you access to the tween direction and rules. this should work with this.

bye,

 Jean

Yanifska

  • Full Member
  • ***
  • Posts: 163
    • My Portfolio
Re: Playmaker + NGUI TweenAlpha
« Reply #2 on: November 18, 2013, 03:45:46 AM »
I didnt know this action
thank you for the help
seems to work perfectly
Visit my portfolio: http://www.yanivcahoua.com/

Yanifska

  • Full Member
  • ***
  • Posts: 163
    • My Portfolio
Re: Playmaker + NGUI TweenAlpha [Solved]
« Reply #3 on: November 18, 2013, 12:20:58 PM »
I have a question/request about this NGUI PlayTween,
I need the "Disable When Finished" to fire even if I don't wait the end of the tween.
Would that be possible to do ?

The reason is I am iterating between multiple elements so they will fade in / out quickly one after another.
And I need to disable them because the elements in question are buttons and when they are hidden (opacity 0) they still show up on mouse over.

Maybe there is another way to avoid this behavior.

Thanks
Yaniv
« Last Edit: November 18, 2013, 03:19:53 PM by Yanifska »
Visit my portfolio: http://www.yanivcahoua.com/

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Playmaker + NGUI TweenAlpha [Solved]
« Reply #4 on: November 19, 2013, 01:03:35 AM »
Hi,

 uhm.. Not too sure that will fit.

I would actually soft disable the buttons in questions, meaning that the fsm responsible for listening to this button input would be disabled during the tweening.

What are you using to listen to NGUI events?


Bye,

 Jean

Yanifska

  • Full Member
  • ***
  • Posts: 163
    • My Portfolio
Re: Playmaker + NGUI TweenAlpha [Solved]
« Reply #5 on: December 05, 2013, 05:40:51 PM »
Few weeks later it just hit me that I should soft disable the Button script and not the AlphaTween Script !!!!
Of course it worked that way !
Visit my portfolio: http://www.yanivcahoua.com/