View Single Post
Old 05-19-2013, 02:24 PM   #2
Fallen Guardian
Wandering the Galaxy...
 
Fallen Guardian's Avatar
 
Join Date: Aug 2010
Location: Unknown Regions
Posts: 1,286
Current Game: Knights of the Old Republic
Veteran Modder Helpful! 
To make the NPC go into stealth mode, you could do something like this:

Code:
void main()
{

   object oNPC = GetObjectByTag("NPC");
   object oBelt = GetObjectByTag("g_i_belt006");

      AssignCommand(oNPC, ActionUseSkill(SKILL_STEALTH, oNPC, 0, oBelt));

}
This requires the NPC to have gi_belt006 (the generic stealth field generator in KotOR 1) equipped. I'm pretty sure there's another way to go about using stealth, but I've never figured it out.

To make the NPC go out of stealth mode I assume you could just call a simple ClearAllActions and ClearAllEffects, such as below.

Code:
void main()
{

   object oNPC = GetObjectByTag("NPC");

      AssignCommand(oNPC, ClearAllActions());
      AssignCommand(oNPC, ClearAllEffects());


}
I'm pretty certain however that an active participant in a conversation is automatically taken out of stealth mode (at least the PC always is).


The truly fallen cannot return to the light. If someone "falls" and "returns," they never really, truly fell.

Current Work in Progress: Dantooine Tension

Released Works
Blaster Pistol Enhancement
Dustil Restoration
Ebon Hawk Texture Enhancement
Gaffi Stick Improvement
Weapon Model Overhaul Texture Rework (Thanks to Toasty Fresh!)
Sunry Murder Recording Enhancement
VP's Hi Poly Tin Cans - KotOR 1 Version
Fallen Guardian is offline   you may: quote & reply,