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.

Making NPC dissapear

Page: 1 of 1
 Mindtwistah
06-19-2007, 3:30 PM
#1
How do I make an NPC to just "dissapear"/"faint away"?

There is another thread about making them run to a location and dissapear but how do I make them dissapear just like that, without running?
 Master Zionosis
06-19-2007, 3:52 PM
#2
Now i don't know if this will work, I'm still learning my scripting, but give this a try:

void main () {

// destroynpc.nss

// This script will make an NPC vanish.

object oNPC=GetObjectByTag("Bastila"); // Replace "Bastila" with your NPC's tag


ActionDoCommand(SetCommandable(TRUE,oNPC));
AssignCommand (oNPC,ActionDoCommand(DestroyObject(oNPC)));

}

I hope that works, which it should :).
 Dashus
06-19-2007, 4:23 PM
#3
You can actually just do
void main(){
DestroyObject( GetObjectbyTag( "Bastila" ) );
}
Though if you're looking to do it in a dialog, you can just call a_destroy and pass in the tag of the object.
 Master Zionosis
06-19-2007, 5:46 PM
#4
You can actually just do
void main(){
DestroyObject( GetObjectbyTag( "Bastila" ) );
}
Though if you're looking to do it in a dialog, you can just call a_destroy and pass in the tag of the object.

Grrrr, whereas my scripts mostly are correct i always make them longer than they should be, grrr :lol:
Page: 1 of 1