Godot 3.1.1 break - Cannot assign a new value to a constant

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)

I confirmed this is a Godot 3.1 incompatibility issue.

Details:

  1. Downloaded the Godot 3.0 HeistMeisters project up to the point I am at, which is 4_Heist_Meisters-eb3b6970e550caa560e26886c81e804f915c5399.zip

  2. Ran that project in Godot 3.0 and confirmed it works properly.

  3. Imported/Ran the same working Godot 3.0 project in Godot 3.1.

  4. Godot 3.1 shows the break: Cannot assign a new value to a constant

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.