How do I activate Bark text when the enemy gets hurt?
How do I activate Bark text when the enemy gets hurt?
Hi guys! I'm not sure if this question has been asked before, but I'm trying to find out how to activate Bark whenever the enemy gets hurt by the player. Does anyone know how to do this?
Re: How do I activate Bark text when the enemy gets hurt?
Hi,
You first need to have a way to know when the enemy gets hurt. When it gets hurt, you can either bark in code, using a string:
or, to bark random lines from a conversation:
Or you can set up a Dialogue System Trigger on the enemy. Set its Trigger to OnUse. Select Add Action > Bark, and configure the bark. When the enemy is hurt, call the Dialogue System Trigger's OnUse() method.
You first need to have a way to know when the enemy gets hurt. When it gets hurt, you can either bark in code, using a string:
Code: Select all
DialogueManager.BarkString("Ouch!", enemy);
Code: Select all
DialogueManager.Bark("Enemy Hurt Barks", enemy);
Re: How do I activate Bark text when the enemy gets hurt?
Thank you Tony! It worked