#help with code

1 messages · Page 1 of 1 (latest)

ember bridge
#

Invalid get index 'player' (on base: 'Node2D').

toxic lodge
ember bridge
#

i just did

#

it gave me this

#

Invalid get index 'player' (on base: 'CharacterBody2D (Player)').

toxic lodge
#

And on line 8 of your SceneManager script, change to player = from since I doubt Player has its own player property

ember bridge
#

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

#

i got this now

toxic lodge
#

I think because you removed player from the tree by removing it as a child from its parent node

#

so from.get_tree() returns null

ember bridge
#

oh so should i reinitiate it?

toxic lodge
#

I'm not entirely sure, it's a bit unclear to me what you're doing. If you're just trying to change the overall Godot scene I don't think you need to reference the player to do that

ember bridge
#

i tried to remove line 9 and game crashes

#

yes yes i am changing entire scene

#

i want the player to move between rooms first then i want to set markers so each have their own specific exits and entries