extends Area2D
export var door = "name"
func _ready():
add_to_group("door")
func open_door_request_dialog():
var dialog = Dialogic.start(door)
dialog.pause_mode = PAUSE_MODE_PROCESS
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
dialog.connect('timeline_end', self, 'end_dialog')
get_tree().paused = true
func end_dialog(_data):
get_tree().paused = false
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
Using dialogic to add dialogue in my game but am currently having trouble with having an area (player) entering another area (the door) to start the dialog.
Before this i had:
func open_door_request_dialog():
var dialog = Dialogic.start(door)
dialog.pause_mode = PAUSE_MODE_PROCESS
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
get_parent().add_child(dialog)
dialog.connect('timeline_end', self, 'end_dialog')
get_tree().paused = true
In which I got back Attempt to call function 'add_child' in base 'null instance' on a null instance.
I thought removing it would help but instead I was bestowed this next error.