Author Topic: Tween color effecting more objects than just the target  (Read 4891 times)

legend411

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
Tween color effecting more objects than just the target
« on: May 05, 2012, 07:07:37 PM »
So I have two separate UIPanels, one has a simple sprite box and some labels, the other has a button with UIButtonTween that has the other panel set as the target object. That panel (set as the target) has a TweenColor component going from 0-255 alpha, disabled at the start.

When I push the button, the panel fades in, but as it fades in the button I pushed fades away, even though its in a totally separate panel from the one set as the target of the UIButtonTween. I tried playing with the depth, to no avail. Is this intended behavior?

EDIT: I also noticed enableThenPlay works in UIButtonTween, but neither disableAfterForward or disableAfterReverse work at all.
« Last Edit: May 05, 2012, 07:28:13 PM by legend411 »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tween color effecting more objects than just the target
« Reply #1 on: May 05, 2012, 07:40:43 PM »
You can specify a group parameter on your tweens if you only want to activate select tweens on your game object.

You should uncheck the "include children" checkbox on your UIButtonTween if you don't want the child tweens to be affected.

legend411

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
Re: Tween color effecting more objects than just the target
« Reply #2 on: May 05, 2012, 09:27:36 PM »
I've got it mostly worked out... the only other thing is the edit I made to the OP, that the Disable When Finished functionality of UIButtonTween doesn't seem to be working at all...

Edit: ohh I see, its not working because I have the button being a toggle. Since toggle just switches between forward/reverse depending on whatever was last done, couldn't disable after reverse still be a viable thing?
« Last Edit: May 05, 2012, 09:29:35 PM by legend411 »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tween color effecting more objects than just the target
« Reply #3 on: May 05, 2012, 09:29:38 PM »
Did you specify the proper condition? If you're always playing the tween forward by activating it, you should specify the "AfterForward" condition.

legend411

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
Re: Tween color effecting more objects than just the target
« Reply #4 on: May 05, 2012, 10:23:57 PM »
Naw its set to toggle, so it switches between forward and reverse. I was hoping "disable after reverse" would still work with a toggle, but it seems it only works when play direction is set to reverse.