Adding playing VFX event to AI NPC¶
This Add playing VFX event to AI NPC assembler allows the AI NPC to play visual effects when triggered. For example, with the fire effect, the player loses the chat, the AI NPC can look like emitting fire.
Prerequisites¶
-
YAHAHA Studio version 0.3.66 or later
-
An AI NPC, created using the Create an AI NPC assembler and placed in the scene Visual Studio Code is installed and integrated with your Studio.
Set up the assembler¶
-
Find a desired effect in Asset Library by navigating to Collections by YAHAHA>AI Game Jam>Effects and add it to your assets. This effect will start to play when triggered.
-
Find the Adding playing VFX event to AI NPC assembler from Asset Library and open it in the scene.
-
In the assembler setup window, populate its basic settings:
a Set the AI NPC to trigger the event: Choose an AI NPC in the scene to trigger the playing VFX event. In our example, we select the AI NPC we created, Mio.b Select the VFX to play: Choose an effect to play.c Select the trigger event: Choose one of the following events as a trigger event for the VFX event:- Emotion 1-10 represents the AI NPC's favor score, ranging from 10% to 100%. It reflects the NPC's contentment level, with 10 being the least content and 100 being the most content.
- Chat Win indicates that the player wins the chat interaction with the AI NPC.
- Chat Lose indicates when the player loses the chat interaction with the AI NPC.
d Set the trigger event name: Enter a name for the triggered event. For example, if you set the trigger to Chat Lose and the event to Fire, when triggered with the favor score reaching 60%, the NPC will play the fire effect.
-
Click Assemble to start assembling this assembler. Once done, you can modify their properties in the Properties window.
Edit event-related properties¶
To edit the effect settings, go to the Properties window and modify them. For more information, see VFX player.
To edit the trigger event, update the properties located in the corresponding AiGameEventRelay pane. For more information on this component, see AiGameEventRelay.