Page 1 of 1
How to recognize what NPC is Barking and use this in barks condition
Posted: Tue Jul 05, 2022 11:19 am
by Saper
Hi
I would like to create one big Conversation for my NPC's Barks but with use of conditions I want to group them like:
- Those lines can say all Police members
- Those lines only medic
- and the last group without condition for all npcs to used them.
Re: How to recognize what NPC is Barking and use this in barks condition
Posted: Tue Jul 05, 2022 2:14 pm
by Tony Li
Hi,
You can check Variable["Actor"]. This will be the display name of the barker. Variable["ActorIndex"] will be the actor's Name field, which you can use to check any other fields in the actor, such as:
-
Conditions: Actor[Variable["ActorIndex"]].Profession == "Police"
I recommend using groups for your conditions:
How To: Use Group Nodes To Reduce Condition Checking Time
Re: How to recognize what NPC is Barking and use this in barks condition
Posted: Wed Jul 06, 2022 5:47 am
by Saper
I tested the group idea but this don't work with "bark on Idle", and about the variable i don't know how to relate object on scene to a line from conversation.
Example:
I have on scene NPC with Bark UI attached to him and it is a policeman, how will conversation condition know that this object on scene is a policeman
Re: How to recognize what NPC is Barking and use this in barks condition
Posted: Wed Jul 06, 2022 11:02 am
by Tony Li
Re: How to recognize what NPC is Barking and use this in barks condition
Posted: Thu Jul 07, 2022 11:27 am
by Saper
Thank you, works like a charm
Re: How to recognize what NPC is Barking and use this in barks condition
Posted: Fri Jul 08, 2022 8:42 am
by Tony Li
Glad to help!