Opacity Sine + Fade (in/out) not working together

0 favourites
  • 3 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Hi. I added some god rays (just a white rectangle with transparent gradient) and added a sine for opacity. But when I try to fade in and out the sine effect is stopped during the fade in and out transitions. Does anyone know a workaround for this so the current opacity is maintained during the fade out effect? And during fade in no opacity changes are made until the fadein is completed.

    I experimented with some other solutions like events testing for the current value and cycle position (sine) but I could not fix it yet.

  • Try setting the "Active at start" property of "Sine" to "No".

    And in your events, do this event:

    +On fade-in finished

    -Set Active (Sine)" Yes.

    Oh, and when the fade-out time comes; however you have programmed it to fade-out, just throw in another action to turn the Sine off.

    Let me know if this works!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks! I had another idea with works great with layer opacity. All rays are on a layer and I just set opacity to opacity.self+1*timescale. This preserves the current opacity of each ray and the sine effect while showing/hiding the layer.

    I tried to implement your idea but I had so many garbage in the code (old / disabled) that it did not work in a reasonable time. But it should be working and I will use it the next time I add new god rays where I cant just add them on a new layer.

    Its much faster and easier with the layer.

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