Hi!
Is it possible to cancel/turn off a conversation when walking away from an NPC? (A 2D game)
I believe I accidently did this in my previous game but can't figure out HOW.
I've got the following things attached to the Player, NPC and Manager.
The Player has:
Proximity Selector
The NPC has:
Dialogue System Trigger
Dialogue Actor
Usable
And the DialougeManager Has:
Dialogue System Controller
Input Device Manager
Dialogue Input
Dialogue System Events
Where, if possible do I make it possible to cancel/turn off a conversation if the player decides to walk away while talking?
Thanks!
Cancel conversation when walking away?
Re: Cancel conversation when walking away?
Hi,
The Dialogue System Trigger component gives you two options to do that:
Stop Conversation On Trigger Exit: Add a trigger collider to the NPC. If the Conversation Actor (i.e., player) leaves the trigger collider, it stops the conversation.
Or:
Stop Conversation If Too Far: While the conversation is active, it monitors the distance between the NPC and player. If it exceeds the max allowed distance, it stops the conversation. Note: This option does a 3D distance check. In a 2D game, make sure the player and NPC position's Z values are similar so it only measures X-Y distance.
The Dialogue System Trigger component gives you two options to do that:
Stop Conversation On Trigger Exit: Add a trigger collider to the NPC. If the Conversation Actor (i.e., player) leaves the trigger collider, it stops the conversation.
Or:
Stop Conversation If Too Far: While the conversation is active, it monitors the distance between the NPC and player. If it exceeds the max allowed distance, it stops the conversation. Note: This option does a 3D distance check. In a 2D game, make sure the player and NPC position's Z values are similar so it only measures X-Y distance.
Re: Cancel conversation when walking away?
Thank you! "Stop Conversation On Trigger Exit: " this worked best - But I have to add it to all covnersations >_< Lucky I made them all prefabs
Re: Cancel conversation when walking away?
Glad to help! Yes, prefabs and prefab variants are handy.