Jump to content

Home

Need help on removing party members (temporarily) script


Doom_Dealer

Recommended Posts

Hello all,

 

time for you to help gd'old me out in the scripting section.

 

OK, i need a script that meens when i warp to my module, it removes all the npcs currently in my party of 3, leaving only the player.

 

i.e. a script to attach to the 'onentry' field in the module.ifo file.

 

ive tried searching this forum, the bioware forum, and NWNLexicon but i cant fin anything :(

 

any help would be greatly appreciated :)

 

also, does any1 know how i can change whether it is possible or not to select your party members or transit back to the ebon hawk in a module, i cant seem to find the right fields in the .git, .are and .ifo files that determines this.

 

Doom Dealer

Link to comment
Share on other sites

Hello Doom,

 

I think you want to use the Remove party member function call, this and many others are in the nwscript.nss;

 

RemovePartyMember(int nNPC);

 

Since you don't know which Party members the player will have in the party at the time so to remove all possible ones you could use something like this;

 

void main()
{
RemovePartyMember(0); // Bastila
RemovePartyMember(1); // Canderous
RemovePartyMember(2); // Carth
RemovePartyMember(3); // HK-47
RemovePartyMember(4); // Jolee
RemovePartyMember(5); // Juhani
RemovePartyMember(6); // Mission
RemovePartyMember(7); // T3-M4
RemovePartyMember(8); // Zaalbar
}

 

As far as setting the NPC's selectability you could try this function in your script;

 

SetNPCSelectability(int nNPC, int nSelectability);

 

As far as the Transit system for custom modules, this thread you might find useful.

 

I hope this helps! :D

Link to comment
Share on other sites

Works a treat, cheers redhawk :)

moderators - feel free to lock, and/or add to the scripting section in the stickies.

 

if anyone needs it for reference in the future:

 

void main()
{
RemovePartyMember(0); 
RemovePartyMember(1); 
RemovePartyMember(2); 
RemovePartyMember(3); 
RemovePartyMember(4); 
RemovePartyMember(5); 
RemovePartyMember(6); 
RemovePartyMember(7); 
RemovePartyMember(8); 
SetNPCSelectability(0,0);
SetNPCSelectability(1,0);
SetNPCSelectability(2,0);
SetNPCSelectability(3,0);
SetNPCSelectability(4,0);
SetNPCSelectability(5,0);
SetNPCSelectability(6,0);
SetNPCSelectability(7,0);
SetNPCSelectability(8,0);
}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...