fading objects without fade behavior

1 favourites
  • 5 posts
From the Asset Store
In this template the music plays without looping in your game
  • im trying to make it so an object fades from 0% opacity to 100% opacity over the course of 180 seconds without the fade behavior

    how can this be done?

  • Every second -> Set opacity to Self.Opacity - 0.555

    So after 180 seconds it will be 0 if started on 100%

    100 / amount of time = amount to decrease per second

  • Every second -> Set opacity to Self.Opacity - 0.555

    So after 180 seconds it will be 0 if started on 100%

    100 / amount of time = amount to decrease per second

    sorry, theres a bit of info i left out, bad on my part

    i need this in order to create transitions for my game's day/night cycle, where i need to be able to fade the object both in and out at different times, and that code seems like it may be unreliable at times

    i originally thought of using lerp, but im not quite sure how to actually use it

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here is an example that goes from 100% to 0% and does de oposite, forever

    Just set the variable time_to_fade in seconds as you wish

    Edit: you can also use actions to change the time to make it faster or slower in other conditions

  • Here is an example that goes from 100% to 0% and does de oposite, forever

    Just set the variable time_to_fade in seconds as you wish

    Edit: you can also use actions to change the time to make it faster or slower in other conditions

    i see, thanks

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