Set a Variable to True on Death of Enemy.
-
- Posts: 93
- Joined: Wed Jan 22, 2020 1:20 pm
Set a Variable to True on Death of Enemy.
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.
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.
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.