Server Totals
M'Chek - (2)
Elysia - (1)
Ferrell - (0)
Wilderness - (0)
Le'Or - (0)
Deglos - (0)
Visimontium - (0)
Underdark - (0)
Mikona - (0)
Total players: 3
Gallery
  • Winter Ball 2015
    Album name: DM Events
    Uploaded by: Ronan
    Uploaded: Sat Jan 03, 2015 4:15 pm

Links Menu

I need more scripting help again.

Moderators: Nighthawk4, Dungeon Masters

I need more scripting help again.

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

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

PostAuthor: 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
Krator
Elder Sage
 
Posts: 4947
Joined: Thu Jun 10, 2004 6:44 pm
Location: Amsterdam
Timezone: GMT

PostAuthor: Jonezie » Thu Aug 18, 2005 10:48 pm

Haha - beat you.
User avatar
Jonezie
Team Member; Retired with Honors
 
Posts: 3906
Joined: Wed Jun 09, 2004 7:05 am
Location: Melbourne (GMT +10)

PostAuthor: 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/

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

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

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


Return to NWN Scripting

Who is online

Registered users: Bing [Bot], Google [Bot]