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.

How to destroy an object

Page: 1 of 1
 Seth Clearwater
12-20-2009, 11:50 PM
#1
I need this for a mod that I'm currently working on... it's a simple little mod, but it's a fun mod for those of you that want a lightsaber on Peragus. :xp: I've tried everything I can think of, but I don't know how to create a destroy script. x_x
 DarthStoney
12-21-2009, 12:41 AM
#2
depending on what you want to detroy this basic script should work

void main() {
object oMyItem = GetObjectByTag("tag name of item", 0);
DestroyObject(oMyItem, 0.0, 0, 0.0, 0);
}
 Seth Clearwater
12-21-2009, 5:53 AM
#3
Thanks ^-^ And it's a lightsaber xD
 LDR
04-29-2010, 6:22 PM
#4
What if it was a creature?
 Hope Estheim
04-29-2010, 6:55 PM
#5
void main()
{
ActionPauseConversation();
object oGoodbye;
oGoodbye = GetObjectByTag("tag_of_npc");
SetGlobalFadeOut(1.0, 0.5);
DelayCommand(1.0, DestroyObject(oGoodbye));
DelayCommand(1.0,SetGlobalFadeIn(0.7,0.0));
ActionResumeConversation();
}

The ActionResumeConversation should be used if you're continuing a conversation. lol
Page: 1 of 1