include library.anims; include library.factions; trigger OnAttach() { messageTo(self, "doFaceTo", null, 5, false); setAnimationMood(self, "npc_imperial"); factions.setFaction( self, "Imperial"); return SCRIPT_CONTINUE; } messageHandler doFaceTo() { // faceto somewhere. obj_id[] objTestObjects = getAllObjectsWithObjVar(getLocation(self), 2000, "stormtrooperFace"); faceTo(self, getLocation(objTestObjects[0])); return SCRIPT_CONTINUE; } messageHandler doEmote() { string strEmote = params.getString("strEmote"); doAnimationAction( self, strEmote); return SCRIPT_CONTINUE; }