-
Notifications
You must be signed in to change notification settings - Fork 94
facing
Ryzom Core Wiki edited this page Jul 8, 2024
·
4 revisions
title: Facing description: published: true date: 2023-03-16T23:06:41.144Z tags: editor: markdown dateCreated: 2023-03-16T22:23:08.383Z
The facing native AI script function is used to make all NPCs in a group face a certain direction or to make one NPC turn and face another NPC.
()facing(direction: f) // facing_f_
()facing(group1: c, botname1: s, group2: c, botname2: s) // facing_cscs_
- direction (float): The new angle of the NPCs in the group in radians.
- group1 (context): The NPC group of the bot that will turn towards the other bot.
- botname1 (string): The name of the bot that will turn.
- group2 (context): The NPC group of the bot that the other bot will face.
- botname2 (string): The name of the bot that the other bot will face.
()facing(3.14);
This example code sets the orientation of all the NPC in the current group to 3.14 radians.
(@group1)group_name1.context();
(@group1)group_name2.context();
()facing(@group1, "bob", @group2, "bobette");
This example code sets the orientation of the NPC named "bob" in group "group_name1" to face the NPC named "bobette" in group "group_name2".