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.

party remove scripting?

Page: 1 of 1
 Pikmin
08-13-2008, 7:38 PM
#1
What function can I use to remove NPCs from the active party but keep them in the module at the same location?
 Trex
08-13-2008, 8:03 PM
#2
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.
 Pikmin
08-13-2008, 8:24 PM
#3
Thanks I'll test it now.
 DarthStoney
08-13-2008, 9:54 PM
#4
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++);
}
}
 Pikmin
08-14-2008, 5:49 AM
#5
Yeah, I got it. Thanks guys.
Page: 1 of 1