Stop my Background from Fading In

Hello everyone, I have an issue. I’ve been trying to figure out this problem for a while and I haven’t found success. In my game, I am trying to simply only have a small overlay on a different layer when a board is interacted with in the game. However, whenever I try and set the opacity of my sprite “DarkOverlay”, it simply fades in…which isn’t what I want. I just want “DarkOverlay” to sit at a 30/255 opacity and it completely fades in. In an attempt to stop the issue, I got toggle disabled and eventually deleted my other commands that might have interfered with this, but this keeps on happening to “DarkOverlay”. How do I stop it?

Here’s a photo of my coding and the end result of what I meant. My coding for this specific result is under “Newspaper & Board”.

You are repeatedly creating DarkOverlay every frame that the scene variable paper = 1. As each new instance is created, it will darken the scene a bit more.

I suggest you have DarkOverlay already created (either in the editor, or in a “At the beginning of the scene” event) and hide it in a “At the beginning of the scene” event.

Then, instead of creating DarkOverlay, just show it. And instead of Deleting it, hide it.

1 Like

Haha, that was such an easy fix. I tried your new solution and it worked. Thank you so much!