I just wanted to post this here because I took a lot of time figuring this one out.
I had a torch that could be visible and invisible but the light wouldn't stop emitting, I took 3 days to finally stumble upon a very simple solution, instead of repositioning the light far away, I came up with setting them active or inactive. I'll just give the script
here if it's okay.
Comments
AC does actually already have a "Light Switch" script - see Section 8.7 of the Manual. In general it's better practice IMO to disable individual components rather than GameObjects. Another way to achieve this is to use animations to animate the light's intensity, and then control it using the "Object: Animate" Action.
Use my script with cutscenes from the scene heirarchy and not from actionlists stored in the project. This is to avoid loss of the objects from the script when loading. I used my script on some actionlists in the project and when I loaded them the scripts have lost the attached objects even when they had constant IDs and parameter IDs, weird but I hope this helps