I was working on this before I read your message and theoretically this is possible.
What Í've coded now works a little like this:
1. Normally the system lets only the PC choose through conversation and uses AI scripts for NPC that aren't the main player character.
2. I've added a section that checks if the NPC is a roster member and if so launches a conversation for the PC in which he selects an action for the companion.
3. The variables are stored on the companion and the companion executes the scripts & moves. (also works for henchman now)
At first I tried launching conversations for party members themselves by making the PC control them but this proved a dead end so I ended up following these three steps.
What I'm wondering about is how I should identify the PC's / party members you are talking about. Are these SoZ party member characters all treated like PC's? Or NPC's? Or Henchmen? How do I make the code treat them like I treat companions right now? How do I identify them from regular NPC's?
For companions and henchmen this is simple, I tell the code to check the companion roster as well as henchmen master. If the NPC is on the roster or has a PC master then the script fires the selection dialogue.
Does anyone know how this works with SoZ style party members? There is still only one main character right???? Do Soz Party members have a master or are they on the campaign roster? Or do they appear to be PC's in the code? (GetIsPC function for example? vs GetPrimaryPlayer)
//For easy reference here is the code that launches said conversations && AI.
if(
GetIsRosterMember(OBJECT_SELF) == TRUE && IsInConversation(OBJECT_SELF) == FALSE && iMade != 0 && iSelect == 0) //Companion
{//PC controls Companions
iSelect = 1;
ExecuteScript("combat_companion_timer", OBJECT_SELF);
//--> This indirectly launches the conversation in which you can choose an action for your Companion.
}
else if(
GetMaster(OBJECT_SELF) == GetPrimaryPlayer() && IsInConversation(OBJECT_SELF) == FALSE && iMade != 0 && iSelect == 0) //Henchman
{//PC controls henchmen
iSelect = 1;
ExecuteScript("combat_companion_timer", OBJECT_SELF);
}
else if(
GetIsOwnedByPlayer(OBJECT_SELF)== FALSE && GetIsPC(OBJECT_SELF)==FALSE && iMade != 0 && iSelect == 0) //I am the Computer and no one else is doing anything
{ //select action and execute!
iSelect = 1;
ExecuteScript("combat_comp_select_action", OBJECT_SELF);
}
So my question is: How do I know, codewise, if the OBJECT_SELF is party of players party? Do SoZ companions return as being PC's? Owned creatures?
In my experience there is still one main player character but what are the other created party members then?
You say it would work if I checked for PC's? (then that would be a conversation with the main character deciding for the other "PC" SoZ style party members.
This sounds incredibly complicated if you type it out, I hope I got the point across

I hope someone can give some insight into this!
Modifié par BartjeD, 21 décembre 2010 - 04:28 .