Silveredge9 Posted January 14, 2008 Share Posted January 14, 2008 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 More sharing options...
stoffe Posted January 15, 2008 Share Posted January 15, 2008 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 More sharing options...
Silveredge9 Posted January 15, 2008 Author Share Posted January 15, 2008 Hmm, I expected it to be much more complicated then that. I must have missed that one in nwscript.nss. I guess I must have been searching using the wrong keywords or something. Thanks. Link to comment Share on other sites More sharing options...
DarthJebus05 Posted January 15, 2008 Share Posted January 15, 2008 You could open the utc file in KOTOR Tool and tick the box 'Is PC' and that should work. I haven't tested that out yet. If it does work, it will save a lot of scripts. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.