Force NPC Choices to Player for a specific node

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Alexis
Posts: 11
Joined: Fri Oct 16, 2020 11:34 am

Force NPC Choices to Player for a specific node

Post by Alexis »

Hello,

Let's say in a specific moment in the game, I want the player to choose for an actor named NPC. I'd like to force a choice for a specific node that has multiple branches. Unfortunately, since the actor is an npc, it gets chosen automatically !

I see a workaround by creating a custom Actor that's a copy of the NPC, but setup as a PC, so it's only used there, but that's not ideal. A better solution would be to have something similar to "RandomizeNextEntry" but to FORCE a choice instead.

Any thoughts ?

Thank you !
User avatar
Tony Li
Posts: 22148
Joined: Thu Jul 18, 2013 1:27 pm

Re: Force NPC Choices to Player for a specific node

Post by Tony Li »

Hi,

If a dialogue entry node is assigned to an NPC (i.e., actor's Is Player checkbox is unticked), it's always a subtitle, not a candidate for a response menu.

You can create an Is Player version of the actor, as you mentioned, or you can tick Is Player on the original actor. If the Dialogue Manager's Input Settings > Always Force Response Menu checkbox is unticked and only one dialogue entry node is valid, it will show that node as a subtitle instead of a response menu.
Alexis
Posts: 11
Joined: Fri Oct 16, 2020 11:34 am

Re: Force NPC Choices to Player for a specific node

Post by Alexis »

Sounds good. I'll go with the second actor solution ! It's not a big hassle, but It generates more actor data than needed.

I think i'd be interesting to have a sequencer command that would force a player choice in valid child nodes. Or, alternatively, a boolean on nodes to tell them they're valid for response menu, no matter the actor.

Thanks for the quick Answer !
User avatar
Tony Li
Posts: 22148
Joined: Thu Jul 18, 2013 1:27 pm

Re: Force NPC Choices to Player for a specific node

Post by Tony Li »

Glad to help!

I'll consider something for the use case you described. Maybe a more general hook to adjust the next ConversationState's npcResponses and pcResponses.
Post Reply