Jump to content

Home

Party Member as PC script


Silveredge9

Recommended Posts

I've been trying to figure out a script that would temporarily replace the PC with one of the party members currently assigned to a specific slot.

 

Recently, to get this effect I've been using a script that changes appearance only.

 

object oPC = GetFirstPC();
effect eShape = EffectDisguise(123);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eShape, oPC);

The drawbacks with this is, that it only changes appearance, whilst Portraits, stats and equiped items are left as the ones associated with the PC.

 

This is for K1. I know it can be done. The sequences where you take control of one of your party members on the Leviathan are an example of the effect I want to achieve. :)

 

Any help on this would be greatly appreciated. :)

Link to comment
Share on other sites

I've been trying to figure out a script that would temporarily replace the PC with one of the party members currently assigned to a specific slot.

 

This can be done using the SwitchPlayerCharacter() function. It removes the player character and temporarily assigns another party member as main character.

 

You specify the party slot constant of which slot to use for main character as parameter, so if you want the player to control T3M4 (or the character occupying T3M4's party table slot) you use it like:

 

void main() {

SwitchPlayerCharacter(NPC_T3_M4);

}

 

To switch the main character back to the player character you would do like:

 

 

void main() {

SwitchPlayerCharacter(NPC_PLAYER);

}

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...