Hi,
Has anyone ran into this break on Godot 3.1.1?
This makes it difficult to follow along with the HeistMeisters lesson in the Discovering Godot course.
I’ve tried to debug this and can’t figure it out, can anyone help?
Thanks
Player.gd:
enum vision_mode {DARK, NIGHTVISION}
func _ready():
Global.Player = self
vision_mode = DARK # <----------- here is the break
func cycle_vision_mode(): # was toggle_torch()
if vision_mode == DARK: # was $Torch.enabled
get_tree().call_group(“interface”, “NightVision_mode”)
vision_mode = NIGHTVISION
elif vision_mode == NIGHTVISION:
get_tree().call_group(“interface”, “DarkVision_mode”)
vision_mode = DARK
Playerdetection.gd:
func NightVision_mode():
$Torch.enabled = false
func Darkvision_mode():
$Torch.enabled = true
VisionMode.gd:
func NightVision_mode():
inform_npcs(“NightVision_mode”)
color = NIGHTVISION
$AudioStreamPlayer.stream = load(Global.nightvision_on_sfx) # load as a file not a string
play_sfx()
get_tree().call_group(“labels”, “show”) # challange answer after make group label and put computer label and LockedDoor label into it
func DarkVision_mode():
inform_npcs(“DarkVision_mode”)
color = DARK
$AudioStreamPlayer.stream = load(Global.nightvision_off_sfx)
play_sfx()
get_tree().call_group(“labels”, “hide”)
func inform_npcs(vision_mode):
get_tree().call_group(“npc”, vision_mode)