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_
()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".