Page 1 of 1

I need more scripting help again.

PostPosted: Thu Aug 18, 2005 10:44 pm
Author: 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!

PostPosted: Thu Aug 18, 2005 10:48 pm
Author: 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).

PostPosted: Thu Aug 18, 2005 10:48 pm
Author: Krator
this line:

DestroyObject(OBJECT_SELF);

PostPosted: Thu Aug 18, 2005 10:48 pm
Author: Jonezie
Haha - beat you.

PostPosted: Thu Aug 18, 2005 10:49 pm
Author: Final Shinryuu
Thank you both very much!

PostPosted: Thu Aug 18, 2005 11:50 pm
Author: 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?

PostPosted: Fri Aug 19, 2005 12:50 am
Author: 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);
}

PostPosted: Fri Aug 19, 2005 3:34 am
Author: 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!