Setting up npcs

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By monascow

This might be too specific I guess, but I am using Emilio’s Dialogic system. So far, I like it myself but I dont know how to set it up for npc interactions. I want to use Area2D collisions to create the interaction for a specific dialogue for each area, make the player stop moving while the dialogue is being played and once it closes give the player their control back. Since I am new I am not sure how to do this via code. Sorry if it sounds too complex, but if anyone can guide me in how I could possibly do this, I will be already thankful.

:bust_in_silhouette: Reply From: Cody Sass

never dealt with Emilio’s, but…

There’s a lot of different ways to disable/enable a player. Probably what I would direct you to take a look at are signals within Godot. Basically give your dialog the ability to emit a signal, make your player listen to that signal, and when it sees that Signal, lock up. Could be as simple as adding a boolean value and as long as that value is false, do your movement as usual.

Other nice thing about signals, is that multiple things can listen to your signal. Your camera could blur the background so your character closeups pop more. Your textbox could use that as a signal to appear.