Jump to content

Home

Modding help switching party leader


mitchjo2345

Recommended Posts

void main()
{
SwitchPlayerCharacter("NPC_TAG_HERE")
}

 

Just replace NPC_TAG_HERE with the tag of the NPC.

 

Almost. :) You don't specify any tag as parameter to the SwitchPlayerCharacter() function, since it requires an integer. You specify the party slot index of the character to make into temporary main character. This is a number between -1 and 11 in TSL, or -1 and 8 in KOTOR1, or you could just use the NPC_ constants instead to make it easier to read. Like:

void SwitchPC(int iSlot) {
   SwitchPlayerCharacter(iSlot);
}

void main() {
   SetGlobalFadeOut(0.0, 2.0);
   DelayCommand(2.0, SwitchPC(NPC_HK_47));
   SetGlobalFadeIn(2.0, 2.0);
}

(...which should fade to black, switch HK47 to main character and then fade in.)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...