TransportAllToWaypoint
#1
Posté 01 septembre 2010 - 06:48
#2
Posté 01 septembre 2010 - 08:26
There is a function that looks at all in party, you may want to look into that or use it in combination with the transportalltowaypoint.
Modifié par Xovian, 01 septembre 2010 - 08:27 .
#3
Posté 01 septembre 2010 - 08:47
void TransportAllFollowersToLocation(object oPC, location oLoc)
{
// Jump the PC
AssignCommand(oPC, ClearAllActions());
AssignCommand(oPC, JumpToLocation(oLoc));
// Not a PC, so has no associates
if (!GetIsPC(oPC))
return;
object oFollower = GetFirstFactionMember(oPC, FALSE);
// Jump any associates
while (GetIsObjectValid(oFollower))
{
int iType = GetAssociateType(oFollower);
if (iType == ASSOCIATE_TYPE_HENCHMAN ||
iType == ASSOCIATE_TYPE_DOMINATED ||
iType == ASSOCIATE_TYPE_FAMILIAR ||
iType == ASSOCIATE_TYPE_SUMMONED ||
iType == ASSOCIATE_TYPE_ANIMALCOMPANION)
{
AssignCommand(oFollower, ClearAllActions());
AssignCommand(oFollower, JumpToLocation(oLoc));
}
oFollower = GetNextFactionMember(oPC, FALSE);
}
}
I haven't tested it yet but I think it will work. Hope it helps.
EDIT: Actually you could probably just do this since you can use the GetFirst/NextFaction member to filter for NPCs only:
void TransportAllFollowersToLocation(object oPC, location oLoc)
{
// Jump the PC
AssignCommand(oPC, ClearAllActions());
AssignCommand(oPC, JumpToLocation(oLoc));
// Not a PC, so has no associates
if (!GetIsPC(oPC))
return;
object oFollower = GetFirstFactionMember(oPC, FALSE);
// Jump any associates
while (GetIsObjectValid(oFollower))
{
AssignCommand(oFollower, ClearAllActions());
AssignCommand(oFollower, JumpToLocation(oLoc));
oFollower = GetNextFactionMember(oPC, FALSE);
}
}
Modifié par GhostOfGod, 01 septembre 2010 - 08:56 .
#4
Posté 03 septembre 2010 - 08:56





Retour en haut






