I'm currently making a game in which you talk to NPCs, and basically if you press E within a certain distance of the NPC the textbox pops up. The textbox consists of what the NPC says and two possible replies.
I've used some simple code for this but when there are a lot of paths, it begins to get a little overwhelming. Is there a way to make a simple thing like an array or function or I don't know what that you just have to call back instead of recreating a bunch of conditions and code each time?
Thanks in advance!