I need more scripting help again.

Moderator: Event DM

Post Reply
User avatar
Final Shinryuu
Sage
Posts: 2060
Joined: Thu Jun 24, 2004 3:20 am
Location: http://hades.mercuric.net/

I need more scripting help again.

Post by Final Shinryuu » Thu Aug 18, 2005 10:44 pm

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!
User avatar
Jonezie
Team Member; Retired with Honors
Posts: 3905
Joined: Wed Jun 09, 2004 7:05 am
Location: Melbourne (GMT +10)

Post by Jonezie » Thu Aug 18, 2005 10:48 pm

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).
Last edited by Jonezie on Thu Aug 18, 2005 10:49 pm, edited 1 time in total.
User avatar
Krator
Elder Sage
Posts: 4935
Joined: Thu Jun 10, 2004 6:44 pm
Timezone: GMT
Location: Amsterdam

Post by Krator » Thu Aug 18, 2005 10:48 pm

this line:

DestroyObject(OBJECT_SELF);
Playing as: Sir Douglas Hope of Gorethar, old school paladin | Krator Blackfist, gold mage | Warren, half nymph barbarian
User avatar
Jonezie
Team Member; Retired with Honors
Posts: 3905
Joined: Wed Jun 09, 2004 7:05 am
Location: Melbourne (GMT +10)

Post by Jonezie » Thu Aug 18, 2005 10:48 pm

Haha - beat you.
User avatar
Final Shinryuu
Sage
Posts: 2060
Joined: Thu Jun 24, 2004 3:20 am
Location: http://hades.mercuric.net/

Post by Final Shinryuu » Thu Aug 18, 2005 10:49 pm

Thank you both very much!
User avatar
Final Shinryuu
Sage
Posts: 2060
Joined: Thu Jun 24, 2004 3:20 am
Location: http://hades.mercuric.net/

Post by Final Shinryuu » Thu Aug 18, 2005 11:50 pm

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?
User avatar
Jonezie
Team Member; Retired with Honors
Posts: 3905
Joined: Wed Jun 09, 2004 7:05 am
Location: Melbourne (GMT +10)

Post by Jonezie » Fri Aug 19, 2005 12:50 am

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);
}
User avatar
Final Shinryuu
Sage
Posts: 2060
Joined: Thu Jun 24, 2004 3:20 am
Location: http://hades.mercuric.net/

Post by Final Shinryuu » Fri Aug 19, 2005 3:34 am

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!
Post Reply