NPC.LookAt C# (CSharp) Method

LookAt() public method

Looks at the NPC
public LookAt ( ) : bool
return bool
    public override bool LookAt()
    {
        //TODO:For specific characters that don't follow the standard naming convention use their conversation for the lookat.
        string output="";
        if (objInt().item_id!=123)//Tybal
        {
            output = StringController.instance.GetFormattedObjectNameUW(objInt(),NPCMoodDesc());
        }
        if ((npc_whoami >=1) && (npc_whoami<255))
        {
            if (npc_whoami==231)//Tybal
            {
                output= "You see Tybal";
            }
            else if (npc_whoami==207)
            {//Warren spectre.
                output= "You see an " + NPCMoodDesc() + " " + StringController.instance.GetString (7,npc_whoami+16);
            }
            else
            {
                if(objInt().isIdentified==true)
                {
                        output=output+" named " + StringController.instance.GetString (7,npc_whoami+16);
                }
            }

        }
        UWHUD.instance.MessageScroll.Add (output);
        return true;
    }

Usage Example

Example #1
0
 protected void ResolveNPCs()
 {
     if (NPC1 != null)
     {
         NPC1.LookAt(Player.transform);
     }
     if (NPC2 != null)
     {
         NPC2.LookAt(Player.transform);
     }
 }
All Usage Examples Of NPC::LookAt