How do I use Tween on a Sprite Button for a Fade Effect?

0 favourites
  • 9 posts
From the Asset Store
Calculate parabolic trajectories and tween objects over them.
  • I'm trying to use Tween (opacity) to make a sprite button "fade" out. The issue is that the button is still functional, even if I have the button set to destroy after the opacity/fade happens. The button properly destroys if I do something like adjust the x scale, but I want the look of a fade.

  • The sprite should be destroyed if it's selected in Tween options, doesn't matter which property you are changing.

    Do you also have Fade behavior on the button? Maybe it interferes with the tween.

  • The only way I can get the sprite with opacity 0 to be non-clickable is to also change its scale to 0. (after the fact).

    Otherwise, I'm able to click on the hidden button still which I don't want. I also want the button to fade back in and be functional again at the set time (in the picture).

  • And even if I have the sprite set to destroy after completion I can still click on it.

  • If you don't want to destroy/remove the button after fading, add a condition to the button on clicked event to check if opacity is greater than 0.

  • I would use "Opacity=100" condition. Because once it has start tweening down, the button should probably not be clickable.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • If you don't want to destroy/remove the button after fading, add a condition to the button on clicked event to check if opacity is greater than 0.

    I essentially am trying to make the button inactive during a set period of the clock I built. What's happening now still is it fades out (opacity tween) but I can still click on it after it's no longer visible. So the tweening is happening at the right time, but the button (sprite) can still be clicked which I do not want to happen.

  • See oosyrag's comment above.

  • Thank you! That worked like a charm adding the opacity condition.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)