Trouble with Khas' awesome lighting

I really hope this is in the right place to post this, I don't use forums too often as I try my hardest to scour google to fix my problem, but I'm sadly out of luck in this case.

Alright, Now to my problem.

I'm using Khas' awesome lighting effects in my game and it's running fine for lighting and such.

My problem is, I have it to go dark at a certain spot using the call:

s = $game_map.effect_surface
s.change_color(120,0,0,0,200)

and it makes things go dark and makes the lights show up very nicely (though it makes text boxes and pictures darker which sucks)

My problem is when I want it to go back to a normal lighting (as if I didn't use the dark call), It will not change back and remains dark.

I've tried using the call:

s = $game_map.effect_surface
s.change_color(0,0,0,0,0)

and also this call

s = $game_map.effect_surface
s.change_color(120,0,0,0,150)

neither works.

I dont want to use the lighting effects for the whole game since the tint screen works fine for most of the game, but I need this for flashlight and other lights for very specific parts.

I've already tried erase event after the call as well as a control switch to erase it, I've tried tint screen back to normal and I've set
Surface_UE = false

I have no idea how to turn off the darkening. I'm probably an idiot, but I can't figure it out for the life of me.
s.change_color(tint fade time, red ,green ,blue, alpha)

so for default use s.change_color(0,0,0,0,255) for maximum brightness.
edit: context would help to. if those are both on the same map it can be buggy unless attached to transitions.
We have a section devoted to problems connected with scripts.
Moved to: RGSSx Script Support
One of the way is to do this:

Code:
s = $game_map.effect_surface
s.set_alpha(0)

If you want to be gradual, then use this:
Code:
s = $game_map.effect_surface
s.change_alpha(time, alpha)
Replace time with time in frames (60 frames are one second in default frame rate), and alpha with the alpha color's opacity ( from 0 to 255).

Also, since you mentioned the alpha color goes above your pictures, check the settings at line 214, where you should see this:
Code:
Surface_Z = 180
Edit it to lower value (I did to 20 in my project, and it works fine so far).
s.change_color(tint fade time, red ,green ,blue, alpha)

so for default use s.change_color(0,0,0,0,255) for maximum brightness.
edit: context would help to. if those are both on the same map it can be buggy unless attached to transitions.

ah sorry, yeah its a different map.
this didnt work though :/ it didnt change the lightness of the area at all uou

We have a section devoted to problems connected with scripts.
Moved to: RGSSx Script Support
sorry! i looked around and wasnt sure where to put this OTL

One of the way is to do this:

Code:
s = $game_map.effect_surface
s.set_alpha(0)

If you want to be gradual, then use this:
Code:
s = $game_map.effect_surface
s.change_alpha(time, alpha)
Replace time with time in frames (60 frames are one second in default frame rate), and alpha with the alpha color's opacity ( from 0 to 255).

Also, since you mentioned the alpha color goes above your pictures, check the settings at line 214, where you should see this:
Code:
Surface_Z = 180
Edit it to lower value (I did to 20 in my project, and it works fine so far).

I tried to use both of those, but all it did was flash the same darkened screen, but then go totally pitch black.

the surface z thing fixed my picture issue though.
Hmm... Goes back to dark screen, you say.
It sounds to me like something else change it back to pitch black. Is there any parallel process event that have the code for
setting dark screen?
Hmm... Goes back to dark screen, you say.
It sounds to me like something else change it back to pitch black. Is there any parallel process event that have the code for
setting dark screen?

ok so i figured out what the problem was! there was another tint screen thing hiding off in a corner. OTL

the script:

s = $game_map.effect_surface
s.set_alpha(0)

worked after removing it, but not the other one, but thats totally fine because it works how i want it to now ;u;

thank you so so so much for your help!

this thread can be closed now!

Original thread: https://forums.rpgmakerweb.com/threads/trouble-with-khas-awesome-lighting.97064/