I'd like to have a party member escort some saved villagers out of a dungeon, the companion will be removed from the party while they do this, and then the companion will return to their hangout. Removing the party member and having them go to the hangout is easy enough for companions in the story, but how to refer to companions created via the SoZ party creation method?
Referring to created companions
Débuté par
kamal_
, oct. 03 2015 06:07
#1
Posté 03 octobre 2015 - 06:07
#2
Posté 03 octobre 2015 - 06:50
something like this:
object GetFirstRosterSoZ()
{
object oRosterSoZ = GetFirstRosterMember();
while (GetIsObjectValid(oRosterSoZ))
{
if (GetIsPlayerCreated(oRosterSoZ)) // <-
return oRosterSoZ;
oRosterSoZ = GetNextRosterMember();
}
return OBJECT_INVALID;
}//RWT-OEI 07/08/08 // Characters created through the party creation mechanics // are stored in the Roster system but are flagged as // PlayerCreated to distinguish them from normal Roster // contained NPCs. Note that if the character is not // in the roster /at all/, this function returns false. // This script function can query that flag. // oCreature - object id of a creature to check int GetIsPlayerCreated( object oCreature );i imagine you'll want to also check for name or some other thingama-doobie. Other than that, they're just roster members
#3
Posté 03 octobre 2015 - 08:20
something like this:
object GetFirstRosterSoZ() { object oRosterSoZ = GetFirstRosterMember(); while (GetIsObjectValid(oRosterSoZ)) { if (GetIsPlayerCreated(oRosterSoZ)) // <- return oRosterSoZ; oRosterSoZ = GetNextRosterMember(); } return OBJECT_INVALID; }//RWT-OEI 07/08/08 // Characters created through the party creation mechanics // are stored in the Roster system but are flagged as // PlayerCreated to distinguish them from normal Roster // contained NPCs. Note that if the character is not // in the roster /at all/, this function returns false. // This script function can query that flag. // oCreature - object id of a creature to check int GetIsPlayerCreated( object oCreature );i imagine you'll want to also check for name or some other thingama-doobie. Other than that, they're just roster members
Yes, I'll want to check by name or tag or something so I can say "Bob, escort the villagers", or "Mary, escort the villagers". I want to let the player pick which companion will be handling the escort duties.
#4
Posté 03 octobre 2015 - 08:56
neat [tm]
Should be straight-up companion stuff then. But if ya ever need to know if a roster-character is SoZ style, that's the funct.
Should be straight-up companion stuff then. But if ya ever need to know if a roster-character is SoZ style, that's the funct.





Retour en haut






