Jump to content

Home

Recruitment Problem...


Godric Volturi

Recommended Posts

Okay, so I got my scripts to finally compile, I /FINALLY/ figured out what was wrong. :p I was putting the "{" in the wrong spot. x_x

 

But anyway, now I have an error when recruiting the new party member... after I recruit the new member, a second copy is still there, the one I recruited and then the one that was spawned. So I was wondering how to destroy the spawned copy of the npc...

Link to comment
Share on other sites

From the Recruitment tutorial....

 

Step 7 --> eliminate "twins" :

 

If you are recruiting an npc that is already used by the game, you may want to use an additional script or you may end up with twins. If you look at step 1 of this tutorial, you'll remember that we extracted the original .utc and renamed it. For the game these are two different objects, even if they have the same appearance. So when you recruit the npc, the original npc will still be there and you'll end up with 'twins". In order to avoid this, you can use the following script which will destroy the original npc on place: (note: don't look for this in the Dustil mod, it's not there. I made him run away instead of destroying him on place )

 

 

Code:

void main()

{

ActionPauseConversation();

object oGoodbye;

oGoodbye = GetObjectByTag("my_npc_tag");

SetGlobalFadeOut(1.0, 0.5);

DelayCommand(1.0, DestroyObject(oGoodbye));

DelayCommand(1.0,SetGlobalFadeIn(0.7,0.0));

ActionResumeConversation();

}oGoodbye = GetObjectByTag("my_npc_tag"); (leave the quotes there) and replace my_npc_tag by the tag of the original npc in the the game. To get the tag, open the .utc file of the original npc in the game with a GFF editor or Kotor tool (for Dustil the .utc file is named kor35_dustil.utc) and check the tag field. The name of the .utc file does not always correspond to the tag field so always check.

 

Save your script with a .nss extension, compile and attach to dialog (do this at the very end of the conversation with the original npc or you'll ran into trouble if he disappears permanently before the end of the conversation ).

Link to comment
Share on other sites

I tried something similiar inside the Taris hideout apt and tried several different scripts (including D333's example above), but none of them got rid of the "twin". It may just be that a disappearing/kill script doesn't work in some areas. If you can get it to work, let me see the .nss file you use. Either here or by pm. thanks.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...