dialog trigger tweak

This commit is contained in:
dukegoobler 2023-01-03 00:20:41 -07:00
parent b7ebc03b0a
commit be54919d93
3 changed files with 9 additions and 7 deletions

View File

@ -6,9 +6,10 @@ func _ready():
pass # Replace with function body.
func _on_DialogTrigger_body_entered(body):
if body.get_name() == "Player":
dialog = Dialogic.start("elevator")
add_child(dialog)
if body.get_parent() != Util.player:
return
dialog = Dialogic.start("elevator")
add_child(dialog)
func _on_DialogTrigger_body_exited(body):
if dialog != null:

View File

@ -6,9 +6,10 @@ func _ready():
pass # Replace with function body.
func _on_DialogTrigger_body_entered(body):
if body.get_name() == "Player":
dialog = Dialogic.start("obelisk")
add_child(dialog)
if body.get_parent() != Util.player:
return
dialog = Dialogic.start("obelisk")
add_child(dialog)
func _on_DialogTrigger_body_exited(body):
if dialog != null:

View File

@ -301,7 +301,7 @@ transform = Transform( -0.449096, 0.167882, 0.254066, 0.12168, 0.619619, -0.0688
transform = Transform( -0.451285, 0.168114, 0.250056, -0.00507374, 0.56347, -0.271243, -0.30563, -0.257587, -0.430144, -1.93217, -0.560821, -0.363808 )
[node name="obelisk" parent="decorations" index="10" instance=ExtResource( 20 )]
transform = Transform( -7.64949e-08, 0, 1, 0, 1, 0, -1.75, 0, -4.37114e-08, 0.485556, -114.994, 8.64844 )
transform = Transform( -8.74228e-08, 0, 2, 0, 1.5, 0, -2, 0, -8.74228e-08, 0.485556, -119.082, -13.125 )
[node name="DialogTrigger" type="Area" parent="decorations/obelisk" index="1"]
transform = Transform( -2.49779e-08, 0, -0.571429, 0, 1, 0, 1, 0, -4.37114e-08, -2.91174, -2.28032, -0.914494 )