I wanted to add an Interaction with a bed to try out the Dialogic plugin. Everything kinda works but the dialog only showes up ones after pressing "interact" and then never again.
I get the error Message "addchild: Parameter "pchild" is null." everytime i try to "interact" again.
This is my Code for the Area 2D
extends Area2D
var Bed1_dialog = Dialogic.start('Bed')
var Interactable=false
func _on_NPC_body_entered(body: PhysicsBody2D):
Interactable = true
func Interact():
if Input.is_action_just_pressed("interact") and Interactable == true:
add_child(Bed1_dialog)
func _process(delta):
Interact()