Set a Variable to True on Death of Enemy.

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
DeidreReay
Posts: 93
Joined: Wed Jan 22, 2020 1:20 pm

Set a Variable to True on Death of Enemy.

Post by DeidreReay »

Hello, I am hoping to find a way to on the death of an Invector Enemy (using your integrations and help from before) to set a Variable to True. There are some on death events that Invector has already for their FSM AI, but not seeing a way that I could easily set a variable to become true or false. Thank you in advance for the help as always.
User avatar
Tony Li
Posts: 22149
Joined: Thu Jul 18, 2013 1:27 pm

Re: Set a Variable to True on Death of Enemy.

Post by Tony Li »

Hi,

You can add a Dialogue System Trigger to the enemy and set it to OnUse. Then select Add Action > Run Lua Code. Configure the Lua Code to set the variable to true.

Finally. configure the enemy FSM's OnDeath() event to call the Dialogue System Trigger component's DialogueSystemTrigger.OnUse method.
Post Reply