extends Node3D var flickerWait = 4500 var flickerWaited = 0 var moveNext = false # Called when the node enters the scene tree for the first time. func _ready(): $"death spotlight".visible = false # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta): flickerWaited += delta*1000 if flickerWaited >= flickerWait: $"../AudioStreamPlayer".pitch_scale = randf_range(0.95,1.0) flickerWaited = 0 $"death spotlight".visible = !$"death spotlight".visible flickerWait = randf_range(50, 750 if !$"death spotlight".visible else 500)