Creating an AI trigger zone¶
This Create an AI trigger zone assembler allows you to create a trigger zone. When the player enters or exits from this zone, an NPC will send a message generated from a specific prompt.
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 the Create an AI trigger zone assembler from Asset Library and open it in the scene.
-
In the assembler setup window, populate its basic settings:
a Select the model of this trigger zone: Choose an model for the trigger zone.b Set the type of trigger: Specify the trigger event by selecting a trigger type. If set to On Enter,the trigger event occurs when the player enters the designated trigger zone. If set to On Exit, the trigger event occurs when the player enters the designated trigger zone.c Select the AI NPC to send the message: Choose an AI NPC in the scene to send a message. In our example, we select the AI NPC we created, Mio.
d Set the prompt to send: Enter the prompt for the message to be sent to the AI NPC. The message will be generated specifically for your character based on the prompt.
-
Click Assemble to start assembling this assembler. Once done, you can modify their properties in the Properties window.
Edit event-related properties¶
To modify the trigger zone, go to AITriggerContent in the Properties window. For more information, see AITriggerContent.md.
To edit the trigger event, update the properties located in the corresponding AiGameEventRelay pane. For more information on this component, see AiGameEventRelay.