Page 1 of 1
I need more scripting help again.
Posted: Thu Aug 18, 2005 10:44 pm
by Final Shinryuu
I'm scared of scripting, so I need someone here to write a simple script for me. And feel free to poke fun at me for not knowing how to do this.
I need a script that I can attach in a conversation, and when run, will make the NPC speaking in that conversation vanish. Vanish as in destroyed, gone, whatever.
So, anyone care to help me out?

I love you long time!
Posted: Thu Aug 18, 2005 10:48 pm
by Jonezie
Code: Select all
void main()
{
DestroyObject(OBJECT_SELF);
}
Attach to a conversation node, and the NPC will disappear after saying their line (or the PCs line, depending on the node you use).
Posted: Thu Aug 18, 2005 10:48 pm
by Krator
this line:
DestroyObject(OBJECT_SELF);
Posted: Thu Aug 18, 2005 10:48 pm
by Jonezie
Haha - beat you.
Posted: Thu Aug 18, 2005 10:49 pm
by Final Shinryuu
Thank you both very much!
Posted: Thu Aug 18, 2005 11:50 pm
by Final Shinryuu
Code: Select all
void main()
{
DestroyObject(OBJECT_SELF);
}
Uh-oh. I made this into a script, and attached it to the action tab in the last line of the conversation, but it's not doing anything. Any idea why it doesn't work?
Posted: Fri Aug 19, 2005 12:50 am
by Jonezie
Hrm...the only things that spring to mind are if you've flagged the NPC as undestroyable, or the conversation is getting in the way somehow. I don't have toolset access right at the moment so i can't look for myself, but a couple of suggestions:
Code: Select all
void main()
{
SetIsDestroyable(TRUE);
DestroyObject(OBJECT_SELF, 0.5);
}
Posted: Fri Aug 19, 2005 3:34 am
by Final Shinryuu
Jonezie wrote:Hrm...the only things that spring to mind are if you've flagged the NPC as undestroyable, or the conversation is getting in the way somehow. I don't have toolset access right at the moment so i can't look for myself, but a couple of suggestions:
Code: Select all
void main()
{
SetIsDestroyable(TRUE);
DestroyObject(OBJECT_SELF, 0.5);
}
It wasn't marked immortal or plot, that thought crossed my mind too.
Thanks for trying, though, I'll try this one instead.
This one worked, thank you Jonezie, you're the best!