posted to: Air movement

Attempt to call function 'enter' in base 'null instance' on a null instance.

I get this error when running the scene but cannot figure out why. Code follows below.

  • M
    Marilius replied


  • a
    andrewjhaugen replied
    It looks like the 'move' property of the air state isn't being populated with anything. My suspicion is line 5 where you write "var move := get_parent()" I believe its possible that the parent hasn't been initialized yet, thus 'move' is being populated with null since it couldn't find the parent. One thing you could try is changing "var move := get_parent()" to "onready var move := get_parent()" Let me know if that gets rid of the error.
  • M
    Marilius replied

    That was the ticket, thank you.

    1 love