Topic was automatically imported from the old Question2Answer platform.
Asked By
lammmab
Hello, I am trying to create a dialog box that shows up when you are currently in an area. I need it so that when you press the space key, and you are also in the area, the dialog box will show up. How would I make that happen?
And then put your event here, assuming the player object is called “player”:
func on_body_entered():
If body.name == “player”:
If Input.is_action_pressed(‘space_key’):
# your text event
My logic is a bit messy but that should be enough to get you there. There is also a plugin named Dialogic that can help specifically with the effect you are looking for.