PDA

View Full Version : Making NPC dissapear


Mindtwistah
06-19-2007, 03:30 PM
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, 03:52 PM
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, 04:23 PM
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, 05:46 PM
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: