dialog trigger fix

This commit is contained in:
dukegoobler 2023-01-03 00:16:38 -07:00
parent ce3f9dd5e5
commit b7ebc03b0a
5 changed files with 8 additions and 8 deletions

View File

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

View File

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

View File

@ -381,9 +381,6 @@ max_wait = 30.0
[node name="Timer" type="Timer" parent="AmbientSounds/BottomWhale2" index="0"]
one_shot = true
[node name="mothers voice" type="Spatial" parent="." index="14"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.428938, -102.191, 13.744 )
[connection signal="body_entered" from="decorations/obelisk/DialogTrigger" to="decorations/obelisk/DialogTrigger" method="_on_DialogTrigger_body_entered"]
[connection signal="body_exited" from="decorations/obelisk/DialogTrigger" to="decorations/obelisk/DialogTrigger" method="_on_DialogTrigger_body_exited"]
[connection signal="body_entered" from="elevator/DialogTrigger" to="elevator/DialogTrigger" method="_on_DialogTrigger_body_entered"]

View File

@ -47,6 +47,7 @@ position=1
auto_color=false
shadow_visible=true
is_hidden=false
shadow_offset=Vector2( 4, 5 )
[audio]

View File

@ -74,7 +74,7 @@
"value": ""
},
{
"character": "",
"character": "character-1672728520.json",
"event_id": "dialogic_001",
"portrait": "",
"text": "LAST OBELISK TERMINAL ACCESS:\n\n\t[/color=green]Ten thousand years ago[/color]\n\t\nLAST STATUS:\n\n\t[/color=green]Seed ripening[/color]"