Skip to content

Game state bug: Invalid access to property or key 'lights_on' on a base object of type 'Nil' #2543

Description

@manuq

Threadbare version

main

Affected scene

Any with a ArtificialLightBehavior. For instance:
res://scenes/game_elements/components/custom_hookable_objects_test.tscn

Description

Way to reproduce it:

  • In the editor, go to menu Project -> Open User Data Folder
  • Remove, if it exists, saved_game.tres (warning, you'll lose your progress)
  • Then try to run a scene with lights, for instance: res://scenes/game_elements/components/custom_hookable_objects_test.tscn

The game crashes, the following error is reported in ArtificialLightBehavior _ready() method:

E 0:00:00:793   ArtificialLightBehavior._ready: Invalid access to property or key 'lights_on' on a base object of type 'Nil'.
  <GDScript Fuente>artificial_light_behavior.gd:51 @ ArtificialLightBehavior._ready()
  <Rastreo de Pila>artificial_light_behavior.gd:51 @ _ready()

Thanks @jgbourque for reporting it.

Checklist

  • I've reviewed and agree to follow the code of conduct

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

No fields configured for Bug.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions