NPC death

This commit is contained in:
Spencer Killen 2023-01-04 19:25:46 -07:00
parent b54053507a
commit 2f2894e656
Signed by: sjkillen
GPG Key ID: F307025B65C860BA
2 changed files with 4 additions and 3 deletions

View File

@ -67,8 +67,9 @@ func close_dialog():
func player_entered():
if has_node("npc_common/SignalGenerator"):
$npc_common.remove_child($npc_common/SignalGenerator)
create_dialog(initial_dialogic_timeline)
if is_alive:
create_dialog(initial_dialogic_timeline)
func player_exited():
close_dialog()

View File

@ -22,7 +22,7 @@ func _input(event):
if Input.is_action_just_pressed("ui_cancel"):
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
else:
if event is InputEventMouseButton and Input.is_action_just_pressed("ui cancel"):
if event is InputEventMouseButton and Input.is_action_just_pressed("ui_cancel"):
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
var look_relative = Vector2(