Godot Version
v4.4.1
Question
Hey guys trying to make my day_night.tscn effect my main scene.
specifically I want the timer I use for the daynight cycle to turn off point lights and hide certain sprites during the day. Any ideas?
v4.4.1
Hey guys trying to make my day_night.tscn effect my main scene.
specifically I want the timer I use for the daynight cycle to turn off point lights and hide certain sprites during the day. Any ideas?
You can connect to the timer’s timeout signal and hide the lights and sprites when it is emitted. If you aren’t familiar with signals, I’d read this guide.
I guess ill just have to keep researching these signals. Im not sure how i link them to other scenes. I see how to link it to whats active in my scene but not via other scenes.
If an instantiated scene is in the SceneTree, you can connect to one of its node’s signals with code. See the connect method.
Example:
func _ready():
var timer = $InstantiatedScene/Timer
timer.timeout.connect(_on_timer_timeout)
func _on_timer_timeout():
print("Timeout")
Thank you! That makes sence. I guess i just needed to see it in raw form for it to click!