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);
}
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
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.
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
Fastmaniac, Ferc is saying that when he runs the script, HK is still there physically but he isnt in the party selection screen.
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());
}
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.
@ 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.
@ 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.
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();
}
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. :(
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