#Enemy State Machine Null Instance

1 messages · Page 1 of 1 (latest)

marsh barn
#

what's the output of the print(current_state) call in line 18?

queen gull
#

<Object#null>

The error message reads "Attempt to call function 'enter' in base 'null instance' on a null instance"

marsh barn
#

i see you've defined an EnemyMove class. what happens if you change EnemyState to EnemyMove in line 4?

eternal geyser
#

I got similar problem when coding my state machine
I have to await a frame before get_node works

queen gull
#

I will try both of those, thank you!

queen gull
#

I'm not sure I'm doing this right with the awaiting a frame, could you screenshot how you did that? I created a timer in the _ready() but it's going on to physics_process() before the timer times out, so I'm still getting the issue