Godric Volturi Posted August 19, 2009 Share Posted August 19, 2009 Okay, so I got my scripts to finally compile, I /FINALLY/ figured out what was wrong. 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 More sharing options...
Lord of Hunger Posted August 20, 2009 Share Posted August 20, 2009 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 More sharing options...
Godric Volturi Posted August 20, 2009 Author Share Posted August 20, 2009 Yeah, ya see... I tried that... but it didn't work. The "twin" was still there. >.< Oh well, not like it really matters... it's on the Endar Spire so the "twin is only there for like five seconds. Link to comment Share on other sites More sharing options...
Canderis Posted August 20, 2009 Share Posted August 20, 2009 Yeah, ya see... I tried that... but it didn't work. The "twin" was still there. >.< Oh well, not like it really matters... it's on the Endar Spire so the "twin is only there for like five seconds. what pard didn't work? Did it compile? Link to comment Share on other sites More sharing options...
Godric Volturi Posted August 20, 2009 Author Share Posted August 20, 2009 Yeah, it compiled... it just didn't delete the NPC that started the recruitment... hmm... well I have an idea and if it doesn't work, I'll just see if I can get rid of the extra NPC that other way again... anyway, thanks for the help. Link to comment Share on other sites More sharing options...
Totenkopf Posted August 20, 2009 Share Posted August 20, 2009 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 More sharing options...
Godric Volturi Posted August 21, 2009 Author Share Posted August 21, 2009 Alright! Thanks! Link to comment Share on other sites More sharing options...
MishraArtificer Posted August 24, 2009 Share Posted August 24, 2009 A little quickie advice from what little I understood from my programming teacher? CHECK YOUR SEMICOLONS! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.