Fallen Guardian Posted February 27, 2012 Share Posted February 27, 2012 So I've been using the GetPartyMemberByIndex function for a bit now, and I was wondering something. If you have two party members with you, say Carth and Bastila, and you set Carth to be the party leader, is Carth still reffered to by this: GetPartyMemberByIndex(1); Or is he now GetPartyMemberByIndex(0); And if so, how would I get around this? Link to comment Share on other sites More sharing options...
Fastmaniac Posted February 27, 2012 Share Posted February 27, 2012 // 577: Returns the party member at a given index in the party. // The order of members in the party can vary based on // who the current leader is (member 0 is always the current // party leader). The way I see it is, that Carth (if you select him as leader) is referred to as index number 0. The important thing is, what do you want to do with the index number? Say Bastila and Carth are in your group. That doesn't necessarily mean they're in the same order everytime you pick them and it also depends on who is the current leader. Carth could have index 1 or 2. So why do you want to get around the leader index 0 if the other indices are assigned (I assume) randomly? Link to comment Share on other sites More sharing options...
Fallen Guardian Posted February 27, 2012 Author Share Posted February 27, 2012 I need PartyMembers 1 and 2 to be moved to specific locations, and then walk to other ones. It really doesn't matter which number is Bastila and which number is Carth, so long as the PC isn't 1 or 2. So how would I set it so the PC was 0? Link to comment Share on other sites More sharing options...
noname35 Posted February 27, 2012 Share Posted February 27, 2012 I need PartyMembers 1 and 2 to be moved to specific locations, and then walk to other ones. It really doesn't matter which number is Bastila and which number is Carth, so long as the PC isn't 1 or 2. So how would I set it so the PC was 0? Just switch him to the party leader. Link to comment Share on other sites More sharing options...
Fallen Guardian Posted February 27, 2012 Author Share Posted February 27, 2012 The problem with that is, this is a cutscene that I'm scripting out, and I cannot rely on the person playing my mod to switch to the party leader in order to make the cutscene play out properly. Link to comment Share on other sites More sharing options...
noname35 Posted February 27, 2012 Share Posted February 27, 2012 Ah I gottcha. Mention something in the readme about it. Thats why they're there. Hope this helps good luck Link to comment Share on other sites More sharing options...
stoffe Posted February 27, 2012 Share Posted February 27, 2012 The problem with that is, this is a cutscene that I'm scripting out, and I cannot rely on the person playing my mod to switch to the party leader in order to make the cutscene play out properly. ... SetPartyLeader(NPC_PLAYER); ... Link to comment Share on other sites More sharing options...
Fallen Guardian Posted February 27, 2012 Author Share Posted February 27, 2012 ... SetPartyLeader(NPC_PLAYER); ... Alright, thanks stoffe. If I were to do something like this: object oPC = GetFirstPC(); SetPartyLeader(oPC); It would be the correct usage, right? Link to comment Share on other sites More sharing options...
VarsityPuppet Posted February 27, 2012 Share Posted February 27, 2012 If all this is going on during a dialog, I think it automatically switches your Player Character to the Party Leader. Link to comment Share on other sites More sharing options...
Fallen Guardian Posted February 27, 2012 Author Share Posted February 27, 2012 Hmm, well while I was testing the scene I saw that the Party Member I always was before the conversation started wouldn't warp to the specific location the script told the # 2 party member to warp to. In his stead was the PC, and the location I sent the "GetFirstPC object" to warp to remained unoccupied, due to a variation in the warps' delay commands. So maybe that's just for KotOR 2? Link to comment Share on other sites More sharing options...
stoffe Posted February 27, 2012 Share Posted February 27, 2012 Alright, thanks stoffe. If I were to do something like this: object oPC = GetFirstPC(); SetPartyLeader(oPC); It would be the correct usage, right? No, the SetPartyLeader() function uses party table slot number as parameter. NPC_PLAYER is a contant with the value -1, which means the player made character. So you do... SetPartyLeader(NPC_PLAYER); ...to force the player char to be the active party member via scripting. Link to comment Share on other sites More sharing options...
Fastmaniac Posted February 27, 2012 Share Posted February 27, 2012 Hmm, well while I was testing the scene I saw that the Party Member I always was before the conversation started wouldn't warp to the specific location the script told the # 2 party member to warp to. In his stead was the PC, and the location I sent the "GetFirstPC object" to warp to remained unoccupied, due to a variation in the warps' delay commands. So maybe that's just for KotOR 2? It should work for KotOR too. And I believe in cutscenes or conversations the current leader stays the same but the player is put in his place. When I started a conversation with an NPC (for example Bastila) Bastila and the PC switch places and after the conversation is over I'm still controlling Bastila in her 'new' place. So you'd have to switch the Player to be current leader before doing that. Link to comment Share on other sites More sharing options...
Fallen Guardian Posted February 27, 2012 Author Share Posted February 27, 2012 Thanks both of you! Link to comment Share on other sites More sharing options...
Fallen Guardian Posted February 29, 2012 Author Share Posted February 29, 2012 Alright, this isn't really the same type of question as I had before in this threads, though it falls under the GetPartyMemberByIndexFunction. I've used it to make the Party Members move to locations and it's worked fairly well. However, whenever they move, they do so at a face paced waddle. Is there a way to make them move normally? Link to comment Share on other sites More sharing options...
noname35 Posted February 29, 2012 Share Posted February 29, 2012 Alright, this isn't really the same type of question as I had before in this threads, though it falls under the GetPartyMemberByIndexFunction. I've used it to make the Party Members move to locations and it's worked fairly well. However, whenever they move, they do so at a face paced waddle. Is there a way to make them move normally? Try using a Gff editor or the Kotor tool. They have functions that let you increase movement speed. Link to comment Share on other sites More sharing options...
JCarter426 Posted February 29, 2012 Share Posted February 29, 2012 Alright, this isn't really the same type of question as I had before in this threads, though it falls under the GetPartyMemberByIndexFunction. I've used it to make the Party Members move to locations and it's worked fairly well. However, whenever they move, they do so at a face paced waddle. Is there a way to make them move normally? Unfortunately, this is "normal" in K1. However, there is a script function to decrease movement speed: // 451: Create a Movement Speed Decrease effect. // - nPercentChange: This is expected to be a positive integer between 1 and 99 inclusive. // If a negative integer is supplied then a movement speed increase will result, // and if a number >= 100 is supplied then the effect is deleted. effect EffectMovementSpeedDecrease(int nPercentChange); I haven't tested it, though. Link to comment Share on other sites More sharing options...
Kl0kw3rk Posted March 1, 2012 Share Posted March 1, 2012 As in Force powers: void Sp_SingleTarget(object oAnchor, effect eLink1, float fDuration1, effect eLink2, float fDuration2); ... eLink1 = EffectMovementSpeedIncrease(99); What are you using to command the movement? Link to comment Share on other sites More sharing options...
JCarter426 Posted March 1, 2012 Share Posted March 1, 2012 I was thinking the good old ApplyEffectToObject. But again, I haven't tested it. Can't, you might say. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.