lfnetwork.com mark read register faq members calendar

Thread: Two Needed Scripts
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 05-19-2013, 03:02 PM   #1
harIII
Veteran
 
harIII's Avatar
 
Join Date: Feb 2008
Posts: 983
Helpful! 
Two Needed Scripts

Can anyone provide me with two scripts?

I need the first one to find an NPC and then make him go into stealth mode indefinitely upon him spawning.

The second one needs to take that NPC out of stealth mode whenever it's fired which will be dialog.

Thanks for any help in advance.
harIII is offline   you may: quote & reply,
Old 05-19-2013, 03:24 PM   #2
Fallen Guardian
Wandering the Galaxy...
 
Fallen Guardian's Avatar
 
Join Date: Aug 2010
Location: Unknown Regions
Posts: 1,288
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,
Old 05-19-2013, 03:37 PM   #3
supreme kotor
Junior Member
 
supreme kotor's Avatar
 
Join Date: Mar 2013
Location: I'm lost.
Posts: 326
Current Game: Modding.. Wait is that a game?
Fallen Gaurdian nailed the first script but if your NPC was doing another action I wouldn't use the second script might I suggest just taking the belt away from the NPC?


Code:
Code:
void main ()
{

object oNPC = GetObjectByTag("my_npc");
object oArmor = GetItemInSlot(INVENTORY_SLOT_BELT,oNPC); 
AssignCommand(oNPC, ActionUnequipItem(oArmor, TRUE));
}


Current WIP: Learning to mod Kotor

Last edited by supreme kotor; 05-19-2013 at 03:47 PM.
supreme kotor is offline   you may: quote & reply,
Old 05-20-2013, 06:24 AM   #4
Hassat Hunter
Forumite
 
Join Date: Jan 2010
Posts: 571
Alternatively, just spawn him in case #2 with the out of stealth effect, like the Sith Assassins on Peragus. No need to have around before...
Hassat Hunter is offline   you may: quote & reply,
Old 06-01-2013, 04:35 PM   #5
Qui-Gon Glenn
Necessary Roughneck
 
Qui-Gon Glenn's Avatar
 
Join Date: May 2007
Location: Thessia
Posts: 1,467
Current Game: ME3MP, Arkham Origins
Folder extraordinaire Helpful! Forum Veteran Veteran Modder 
I did something almost exactly like this once.

Sith Stalker code in the Script Shack should cover 99% of this.


Want to play a game of ME3MP?
Qui-Gon_Glenn on the software of which we shall not name.... add me and the enemy shall fall in chunks of crimson salsa
Qui-Gon Glenn is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Editing / Modding > Holowan Laboratories > Two Needed Scripts

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:45 AM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.