Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Need help on removing party members (temporarily) script

Page: 1 of 1
 Doom_Dealer
12-19-2004, 10:16 AM
#1
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
 RedHawke
12-19-2004, 10:40 PM
#2
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 (http://www.lucasforums.com/showthread.php?s=&threadid=140253) you might find useful.

I hope this helps! :D
 Doom_Dealer
12-20-2004, 8:40 AM
#3
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);
}
 RedHawke
12-20-2004, 8:10 PM
#4
Glad I could help! :D
Page: 1 of 1