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.

Scripting Questions ("Forced" Recruiting)

Page: 1 of 1
 Dak Drexl
05-29-2011, 6:34 PM
#1
This might be tough for me to explain but I'll try my best.

I'm making a sidequest that the PC is not a part of at all. I found a script to change the party leader, so I have that covered. However, how do I make temporary party members? Moreover, how do I make it so that they are "forcibly" selected so that when recruited you can't just pick another member instead of the new member that I'm intending to join on this mission?

I guess I recruit the new NPC as normal and re-recruit the original party members when the quest is finished, no? I'm just pretty confused with this. I would appreciate any help!
 newbiemodder
05-29-2011, 8:35 PM
#2
I'll use my examples to show how I did it

This is how I added Jolee to the selection gui to replace Kreia

void TwinsFunction()
{

object oGoodbye;
oGoodbye = GetObjectByTag("Jolee");

DelayCommand(2.0, DestroyObject(oGoodbye));

}

void RecruitFunction()
{
RemoveAvailableNPC(6);
AddAvailableNPCByTemplate(6, "p_jolee02");
SetNPCSelectability(6, TRUE);
DelayCommand(1.5,ShowPartySelectionGUI("", 6));


}

void main()
{

RecruitFunction();
TwinsFunction();


}

The code above in yellow is how I added Jolee to replace Kreia and make him mandatory in the party.

void main() {


DestroyObject(GetObjectByTag("plc_elevbtn"));
DestroyObject(GetObjectByTag("Jawa01"));

RemoveAvailableNPC(6);
AddAvailableNPCByTemplate(6, "p_kreia");
SetNPCSelectability(6, FALSE);

}

This section in yellow restored Kreia to the gui''=

Hope this helps you in some way.
Page: 1 of 1