Preventing the light being on at the start


I figured out the practice Turning the Lights On pretty easily but I just wanted to prevent the light and the timer being automatically on at the beginning of the game. Cause I got the practice right but this is just annoying, right? :D

I tried several things like:
- timer.set_timer_process_mode(0) in _ready()
- or timer.stop() at _ready()
- setting the light.enable to false at _ready()
- turning the Light.tscn AnimationPlayer's Autoplay on Load off
- changing the body: Node to body: KinematicBody2D
- light.set_enabled(false)

but nothing has worked yet.

So I think I don't have a good intuition on how this light turns off since I just can't see a reason why the light.enabled would still be true and turn on. My thinking right now is that I've been close with a couple of approaches but I just simply don't know where to place the code.

Could someone nudge me in the right frame of mind here, please? :)

  • Nathan Lovato replied

    The practice tests are the ones turning the lights on, they simulate activating the switch. That's why you can't prevent them from being on. And if you wrote code to prevent that, it would likely make the practice fail.

    That aside, great job finding many ways to turn off the lights. Generally speaking, when working on your own game, setting the enabled property of something to false (if this property exist) should be the way to disable the thing.