Page 1 of 1

Set a Variable to True on Death of Enemy.

Posted: Sun Apr 03, 2022 11:39 pm
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.

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

Posted: Sun Apr 03, 2022 11:45 pm
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.