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.

Removing Party Member problem.

Page: 1 of 1
 Ferc Kast
08-27-2011, 11:55 AM
#1
Hey, I was testing a script to remove a party member. But, when I ran it, the party member was still in my current party but removed from the party member selection screen. Can anyone tell me how to fix my script to make it work?

void main() {
object oOB48 = GetObjectByTag("HK47");
RemoveFromParty(oOB48);
RemoveAvailableNPC(5);
}
 Fastmaniac
08-27-2011, 1:09 PM
#2
I don't see the problem of the script. I never got it to work for myself. Though a possibility would be to include the ShowPartySelectionGUI function to make sure, the NPC can't be selected.

Fastmaniac
 Ferc Kast
08-27-2011, 1:42 PM
#3
I don't see the problem of the script. I never got it to work for myself. Though a possibility would be to include the ShowPartySelectionGUI function to make sure, the NPC can't be selected.

Fastmaniac

The part that works is that the NPC can't be selected; But, he wasn't removed from my active party.
 Fastmaniac
08-27-2011, 1:45 PM
#4
Yeah, but if you force the user to choose a new party, your current party members will leave your current group. That'll be the point of "forcing" the Party Selection Screen
 Snard
08-27-2011, 2:19 PM
#5
Fastmaniac, Ferc is saying that when he runs the script, HK is still there physically but he isnt in the party selection screen.
 Canaan Sadow
08-27-2011, 2:39 PM
#6
Try this script with the altered values and such, if need be and obviously replace the template resref lol :) this script is a sure fire for me ^^


void main()
{
RemoveAvailableNPC(5);
AddAvailableNPCByTemplate(5, "p_decklan");
DelayCommand(1.5,ShowPartySelectionGUI());
}
 Ferc Kast
08-27-2011, 2:54 PM
#7
Try this script with the altered values and such, if need be and obviously replace the template resref lol :) this script is a sure fire for me ^^


void main()
{
RemoveAvailableNPC(5);
AddAvailableNPCByTemplate(5, "p_decklan");
DelayCommand(1.5,ShowPartySelectionGUI());
}

Well, it's a custom party member that I'm trying to remove after the player finishes a dialog at the end of a module. So, the adding a new npc function isn't what i'm looking for.
 Fastmaniac
08-27-2011, 2:55 PM
#8
@ Darth Snard: I got that. The problem is, that he hasn't been erased by the script. I just suggested, that if he chose a COMPLETE NEW GROUP from the party selection screen it would ERASE the existing HK-47 NPC from the current party.

Edit: Forgot to ask this: Did you set the NPC-Tag to "HK47"? Then you would be able to recruit it, but it won't be found if the Tag is different.
 Ferc Kast
08-27-2011, 4:41 PM
#9
@ Darth Snard: I got that. The problem is, that he hasn't been erased by the script. I just suggested, that if he chose a COMPLETE NEW GROUP from the party selection screen it would ERASE the existing HK-47 NPC from the current party.

Edit: Forgot to ask this: Did you set the NPC-Tag to "HK47"? Then you would be able to recruit it, but it won't be found if the Tag is different.

well, i had chosen another npc in the party selection screen; but, the custom party member was still in the current party. and, yes, the npc tag is set to "HK47". (which is how i recruited the party member in the first place) it's just removing him from the party that my problem lies.
 Fastmaniac
08-27-2011, 5:15 PM
#10
ok... So that's weird... Because recruiting members by Tag isn't possible I think...

Try adding this script to the last line of the conversation:


void main()
{
ActionPauseConversation();
object oGoodbye;
RemoveFromParty(oGoodbye);
RemoveAvailableNPC(5);
oGoodbye = GetObjectByTag("HK47");
SetGlobalFadeOut(1.0, 0.5);
DelayCommand(6.0, DestroyObject(oGoodbye));
DelayCommand(7.0,SetGlobalFadeIn(0.7,0.0));
ActionResumeConversation();
}
 Ferc Kast
08-27-2011, 6:38 PM
#11
ok... So that's weird... Because recruiting members by Tag isn't possible I think...

Try adding this script to the last line of the conversation:


void main()
{
ActionPauseConversation();
object oGoodbye;
RemoveFromParty(oGoodbye);
RemoveAvailableNPC(5);
oGoodbye = GetObjectByTag("HK47");
SetGlobalFadeOut(1.0, 0.5);
DelayCommand(6.0, DestroyObject(oGoodbye));
DelayCommand(7.0,SetGlobalFadeIn(0.7,0.0));
ActionResumeConversation();
}


Firstly, as far as I understood you need to use the old party member's tag to successfully recruit a new party member. Secondly, I just tried that script & the droid is still in my active party but unselectable on the selection screen. :(
 Canaan Sadow
08-27-2011, 7:36 PM
#12
Well, it's a custom party member that I'm trying to remove after the player finishes a dialog at the end of a module. So, the adding a new npc function isn't what i'm looking for.

You can use it to re-replace the custom character. :p
Page: 1 of 1