What function can I use to remove NPCs from the active party but keep them in the module at the same location?
What function can I use to remove NPCs from the active party but keep them in the module at the same location?
Here's one I had handy.
void main()
{
//ATTON
if ( IsNPCPartyMember( NPC_ATTON ) )
RemovePartyMember( NPC_ATTON );
//Bao Dur
if ( IsNPCPartyMember( NPC_BAO_DUR ) )
RemovePartyMember( NPC_BAO_DUR );
//Canderous
if ( IsNPCPartyMember( NPC_CANDEROUS ) )
RemovePartyMember( NPC_CANDEROUS );
//G0T0
if ( IsNPCPartyMember( NPC_G0T0 ) )
RemovePartyMember( NPC_G0T0 );
//Handmaiden - this also clears disciple
if ( IsNPCPartyMember( NPC_HANDMAIDEN ) )
RemovePartyMember( NPC_HANDMAIDEN );
//HK-47
if ( IsNPCPartyMember( NPC_HK_47 ) )
RemovePartyMember( NPC_HK_47 );
//Kreia
if ( IsNPCPartyMember( NPC_KREIA ) )
RemovePartyMember( NPC_KREIA );
//Mira - this also removes Hanharr
if ( IsNPCPartyMember( NPC_MIRA ) )
RemovePartyMember( NPC_MIRA );
//T3-M4
if ( IsNPCPartyMember( NPC_T3_M4 ) )
RemovePartyMember( NPC_T3_M4 );
//Visas
if ( IsNPCPartyMember( NPC_VISAS ) )
RemovePartyMember( NPC_VISAS );
}
If you only want specific members removed, only use the lines that apply to them.
Hope that helps.
Here's a short but simple scipt that will do the same thing
void main() {
int int1 = 0;
int1 = 0;
while ((int1 < 12)) {
if (IsNPCPartyMember(int1)) {
RemovePartyMember(int1);
}
(int1++);
}
}
Yeah, I got it. Thanks guys.