Adding revolve event to AI NPC (other object)¶
This Add revolve event to AI NPC (other object) allows your AI NPC to trigger another object in the scene to revolve. For example, when the NPC's favor score hits 60%, a specified object will move around a certain axis and point.
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 Add revolve event to AI NPC (other object) 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 revolve event (other object). In our example, we select the AI NPC we created, Mio.
b Select the object triggered to revolve: Choose an object in the scene to revolve when triggered. It should be different from the selected AI NPC.c Select the axis to revolve around: Specify an axis around which the selected object will move around.d Set the speed of revolve: Control how quickly the triggered object revolves. Higher values result in faster revolution. Ranges from 1 to 15. Default: 10.d Select the trigger event: Choose one of the following events as a trigger event for the revolve event (other object):- 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.
e Set the triggered event name: Enter a name for the triggered event. For example, if you set the trigger to Emotion 6 and the event to Revolve, the triggered object will revolve when the NPC's favor score hits 60%. -
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 revolution settings, go to the triggered object's Properties window by selecting it and clicking the More button, then edit the revolution settings in the Behavior revolve pane. For more information on revolution, see Behavior revolve.
To edit the trigger event, update the properties located in the corresponding AiGameEventRelay pane. For more information on this component, see AiGameEventRelay.