Jump to content

How Do I Detect If An Npc Is Sitting And Make It Stand?


Recommended Posts

Posted

Hi

 

I've been looking all over the net for an answer to this with no luck so decide to ask. I need to test inside a script if an NPC is sitting and make him stand up before I issue a command. Problem is I have no idea which chair the NPC could be sitting in so have no reference to use in the IsCurrentFurnitureRef function,

 

Does anyone know of an easy way?

Posted

There is the GetSitting function, if not 0 then the actor is sitting (GetSleeping should be used with bed).

To get the furniture, use IsCurrentFurnitureObj or IsCurrentFurnitureRef depending if you need the base form or the reference.

 

Posted

 

Ok I never thought of looking at that function to solve my problem. Thanks for the tip it may prove useful for something else I need to do.

 

There is the GetSitting function, if not 0 then the actor is sitting (GetSleeping should be used with bed).

To get the furniture, use IsCurrentFurnitureObj or IsCurrentFurnitureRef depending if you need the base form or the reference.

 

Duh! I can not believe I missed that function. :blush:   Thanks mate, it solved the checking problem and I use a travel package to force him to stand, solving my second problem.

 

Thanks everyone :shy:

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...