Ferc Kast Posted July 9, 2008 Share Posted July 9, 2008 Original Thread This is a recruit script I made a while back for TSL. I decided to finally release this as free source. You can use it in your TSL recruit mods, as long as you credit me in your readme file. This script has been tested, to ensure best results. ~~ Download script~~ void main(){ int iAction = GetScriptParameter(1); if ( iAction == 1 ){ // Recruit "sNPC" int iNPC = GetScriptParameter(2); string sNPC = GetScriptStringParameter(); RemoveAvailableNPC(iNPC); AddAvailableNPCByTemplate(iNPC, sNPC); DelayCommand(1.5,ShowPartySelectionGUI()); } else if ( iAction == 2 ){ // Eliminate "Twins" string sNPC = GetScriptStringParameter(); object oNPC = GetObjectByTag(sNPC); ActionPauseConversation(); SetGlobalFadeOut(1.0, 0.5); DelayCommand(1.0, DestroyObject(oNPC)); DelayCommand(1.0,SetGlobalFadeIn(0.7,0.0)); ActionResumeConversation(); } } Here's how to attach the script to your dialog: Click on your last entry or reply in your dialog, then fill in the script #1 & script #2 rows with the values from the above picture. In script #1, replace the 3 with the number of the NPC that you will replace. (Here is a list of the TSL NPC numbers.) Next, change "YOUR_NPC_RESREF" to the resref from the recruited NPC's utc. (I.E. "p_test") In script #2, replace "YOUR_NPC_TAG" to the tag of the pre-recruited NPC's utc. (I.E. "p_test001") Note that this script & tutorial will only work in KotOR II: The Sith Lords, and not in KotOR I. Link to comment Share on other sites More sharing options...
The Betrayer Posted July 10, 2008 Share Posted July 10, 2008 Is this just a script for the recruiting part? Link to comment Share on other sites More sharing options...
Ferc Kast Posted July 10, 2008 Author Share Posted July 10, 2008 Yes, this script is for the recruiting itself. Aside from this script, one would only need to follow Darth333's tutorial to recruit an NPC. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.