Fade Behavior ignores delay parameter

0 favourites
  • 2 posts
  • The fade behavior seems to works fine for the most part, but when I use it on a 'Start Of Layout' event which calls a function it works fine the first time (a second delay before fading out) but when I return to this layout later in the game the fade seems to ignore the delay and just fades immediately.

    Its strange because its the same piece of code wrapped inside a function.

    Any ideas? Thanks

    // for some reason when coming back to the main scene this function runs but ignores the wait time

    * On function 'Fade_Out_Load_Screen'

    * Parameter 'delay' (Number)

    -> Browser: Log in console: "Calling Fade OUT"

    -> Browser: Log in console: "FADE OUT SECONDS: "&delay

    -> Full_Screen_Loader_BG: Fade: set wait time to delay

    -> Full_Screen_Loader_BG: Fade: set fade-in time to 0

    -> Full_Screen_Loader_BG: Fade: set fade-out time to Load_Screen_Fade_Speed

    -> Full_Screen_Loader_BG: Fade: start fade

    Note that the "FADE OUT SECONDS: "&delay prints correctly 3 seconds even though the fade happens immediately.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • SOLVED. The object with the fade behavior was set to global. Removing that seemed to fix the issue.

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