
It looks like you're new here. If you want to get involved, click one of these buttons!
Hey everyone!
I would like your help cause I made a dialogue script yesterday to test out some stuff (It works just fine) and today I wanted to make a script to make the ui and the text to appear when you interact with a random NPC
So after trying something I was able only to make the script see if the player is on range to interact with the colision box I gave to the NPC but if I am far away and press the button I use to interact the dialogue still appears ...
it also appears just once and never again if I press the button again...
What have I done wrong?
Is there maybe a better way to do this?
I am pretty much a beginner just trying to make stuff for fun but having a hard time figuring out stuff
All help would be appreciated!
Here are some screenshots of the scripts and from Unity
Dialogue script:
Interaction script:
And some Unity screenshots just in case:
Many thanks on advance!