Hello, I have been trying to find a tutorial for this but I cannot find one anywhere. I want to make an NPC that triggers dialouge when I am 3 or less meters away from it. I just started Godot a week ago so I am having trouble with this. I also need help with the dialouge box as I do not know how to code it to change text and ChatGPT and Copilot's code is useless.

    w61652576

    +

    +

    FYI i used google instead of chatjeepeety, took me 2 min to find tutorials that covers your problems. dont be lazy

    I have not tried in 3d but with the 2dgame i am making i create scenes of richtextlabel and add a child node that is a sprite for the rectangle.

    Then i made that when space is pressed and if my character overlaps a area2d of the npc( you have to add a collisionshape2d to the area 2d, it will run different that with bodies) the instance is added.
    Then i put the mode to stop.
    I also put the richtextlabel as procces mode, this way it wouldnt stop .