Fade behaviour doesn't read updated opacity?

0 favourites
  • 5 posts
  • I'm not sure if this would be considered a bug.

    I'm using the fade behaviour. When you first run the game, the plugin seems to run through all the sprites in the layout and get their opacity, setting "this.maxOpacity" to the current opacity.

    This seems to have an odd side effect: If I set a sprite to opacity 50 in it's properties, maxOpacity is set to 50 on load and it fades out correctly. However if I set the opacity through an action then maxOpacity is already set to 100 on load, causing the fade behaviour to jump from 50 back to 100, then fade out.

    Does this seem like a bug? I'm hesitant to report this if I'm just missing a step.

  • Sounds like it's working properly. If you issue the action while the fade is fading, the fade will override the opacity you set.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sounds like it's working properly. If you issue the action while the fade is fading, the fade will override the opacity you set.

    It's not so much that the fade is overwriting the fade, but that the fade is starting at the wrong opacity. If I do the following steps:

    1) Create a sprite, add fade behaviour and set "Active at start" to false.

    2) "On Spacebar down", set opacity to 50

    3) Start fade.

    Sample Capx

    Instead of the sprite starting at 50 and moving down to 0, it goes back to 100 (the default opacity) and then starts fading to 0. The reason being that it's basing the start opacity on maxOpacity, which gets set when the layout starts (not the new opacity I set in the action).

  • Ashley : Any further thoughts after the post+sample above?

  • Hi, I found your thread about the problem and wanted to demonstrate it again with another example:

    Link to site

    Fade opacity bug CAPX

    I wanted to demonstrate also a workaround by using a while-wait pair... but suddenly it didn't work. Take a look into the capx. Maybe you could have a guess why.

    <img src="http://www.colarion.com/construct2-test/While-wait.jpg" border="0">

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