Jump to content

Home

Problem with making npc disappear


revanmg

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...