Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Problem with making npc disappear

Page: 1 of 1
 revanmg
06-30-2007, 11:18 AM
#1
I have the script:

void main()
{
object oNPC=GetObjectByTag("p_Kicht");
ActionDoCommand(SetCommandable(TRUE,oNPC));
AssignCommand (oNPC,ActionDoCommand(DestroyObject(oNPC)));
}

running when my conversation ends. I also had,

void main()
{
object oNPC=GetObjectByTag("p_Kicht");
ActionDoCommand(SetCommandable(TRUE,oNPC));
AssignCommand (oNPC,ActionDoCommand(DestroyObject(oNPC)));

RemoveAvailableNPC(1);
AddAvailableNPCByTemplate(7, "p_Kicht");
DelayCommand(1.5,ShowPartySelectionGUI());
}

this running before but the only thing that happened was my npc joined me but the original one didn't disappear. And now that I only have the destroy script running nothing happens. Could someone tell me what I am doing wrong?
 Shengali
07-06-2007, 4:39 AM
#2
I'm relatively new to this whole thing, but I think the problem is that you have the tag as "p_kicht". You're thinking of the ResRef. Look at the .utc file again and look who you have as the tag in the field under "last name".

Having spent the last 2 days trying to fix this same problem with my mod, I just now got it to work by fixing this little oversight.
Page: 1 of 1