I'm trying to get the ball rolling with my game's dialogue. I don't want to do like I see in most of the tutorials (that I've found) on the web where you use a trigger collider. I'd much rather prefer that if the player gets close enough to an NPC and pushes a certain button, that it initiates a conversation with the NPC. Anyone have any suggestions on how I can go about (starting) to achieve this?
Use the trigger collider like the tutorials you've watched, but rather than simply firing off the dialogue function in the OnTriggerEnter function, use OnTriggerStay and then an if( Input... (etc.) to ask for the input. In other words, you can use the trigger collider to determine that the player is close enough, and then a second piece of logic to actually begin the dialogue.
Code (CSharp): if(Vector3.Distance(characterPosition, npcPosition) < someDistance && Input.getKeyDown(interactKey)) { runInteractionScript(); } As for the interaction, I would have the interaction disable the player & switch your GUI state to an npc prompt, taking the ID of the npc you're talking to as the parameter. Good luck with stuff.