Hi
I want the bark to work like a conversation
default bark- if the condition is neutral (bark neutral) positive (bark positive ) else negative (barks negative)
and i want to trigger animation if the bark is negative positive or neutral
Bark condition with NPC status
Re: Bark condition with NPC status
Hi i also want NPC 2 to react when the bark is positive negative or natural.
Re: Bark condition with NPC status
Hi i have a problem, the bark cant be added to multiple instances
Re: Bark condition with NPC status
Hi,
You'll want to set up the conversation similarly to this:
Let's say you're using the Relationship Lua Functions to keep track of how NPCs feel about the player.
For example, if the NPC hates the player, you use this Lua (e.g., in a Script field):
Then you can set the first dialogue entry's Conditions to:
You'd set the second entry's Conditions to:
and the third entry's Conditions to:
This will work, but it will only work for NPC1. To make it work for any NPC, you will need to change the Conditions. When the Dialogue System starts a bark or conversation, it sets Variable["ActorIndex"] to the NPC's name. (Technically it sets it to the actor index.)
So instead of Actor["NPC1"] you can use Actor[Variable["ActorIndex"]]:
You'll want to set up the conversation similarly to this:
Let's say you're using the Relationship Lua Functions to keep track of how NPCs feel about the player.
For example, if the NPC hates the player, you use this Lua (e.g., in a Script field):
Code: Select all
SetRelationship(Actor["NPC1"], Actor["Player"], "like", -50)
Code: Select all
GetRelationship(Actor["NPC1"], Actor["Player"], "like") <= -50
Code: Select all
GetRelationship(Actor["NPC1"], Actor["Player"], "like") >= 50
Code: Select all
50 < GetRelationship(Actor["NPC1"], Actor["Player"], "like") and GetRelationship(Actor["NPC1"], Actor["Player"], "like") < 50
So instead of Actor["NPC1"] you can use Actor[Variable["ActorIndex"]]:
Code: Select all
GetRelationship(Actor[Variable["ActorIndex"]], Actor["Player"], "like") <= -50