Page 1 of 1

Force NPC Choices to Player for a specific node

Posted: Wed Jun 23, 2021 2:57 pm
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 !

Re: Force NPC Choices to Player for a specific node

Posted: Wed Jun 23, 2021 3:45 pm
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.

Re: Force NPC Choices to Player for a specific node

Posted: Wed Jun 23, 2021 7:25 pm
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 !

Re: Force NPC Choices to Player for a specific node

Posted: Wed Jun 23, 2021 8:05 pm
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.